Commit eb23dcd2 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown

ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug

The irq_get_irq_data() function doesn't return error pointers, it
returns NULL.

Fixes: 6ba9dd6c ("ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 3af81600
......@@ -1845,9 +1845,9 @@ static int cs35l36_i2c_probe(struct i2c_client *i2c_client,
cs35l36_apply_vpbr_config(cs35l36);
irq_d = irq_get_irq_data(i2c_client->irq);
if (IS_ERR(irq_d)) {
if (!irq_d) {
dev_err(&i2c_client->dev, "Invalid IRQ: %d\n", i2c_client->irq);
ret = PTR_ERR(irq_d);
ret = -ENODEV;
goto err;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment