summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-02-22 09:31:51 +0300
committerMark Brown <broonie@kernel.org>2019-02-22 15:13:03 +0000
commiteb23dcd20e91fe97679257dc4d195a707b4a0d1a (patch)
treec2240ba825827e399b9ce65d360260937d346188 /sound
parent3af8160028bfac4116d80edcb7eb04095323d112 (diff)
downloadlinux-eb23dcd20e91fe97679257dc4d195a707b4a0d1a.tar.bz2
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: 6ba9dd6c893b ("ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/cs35l36.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c
index dc8cf61b9db8..e9b5f76f27a8 100644
--- a/sound/soc/codecs/cs35l36.c
+++ b/sound/soc/codecs/cs35l36.c
@@ -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;
}