Skip to content

Commit 8886e1b

Browse files
harshimogalapallibroonie
authored andcommitted
ASoC: codecs: Fix error code in aw88261_i2c_probe()
Passing zero to dev_err_probe is a success which is incorrect when i2c_check_functionality() fails. Fix this by passing -ENXIO instead of zero to dev_err_probe(). Fixes: 028a2ae ("ASoC: codecs: Add aw88261 amplifier driver") Reported-by: kernel test robot <lkp@intel.com Reported-by: Dan Carpenter <error27@gmail.com Closes: https://lore.kernel.org/r/202308150315.CvOTIOKm-lkp@intel.com/ Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com Link: https://lore.kernel.org/r/20230824191722.2701215-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Mark Brown <broonie@kernel.org
1 parent 45b4878 commit 8886e1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/codecs/aw88261.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,7 @@ static int aw88261_i2c_probe(struct i2c_client *i2c)
12451245

12461246
ret = i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C);
12471247
if (!ret)
1248-
return dev_err_probe(&i2c->dev, ret, "check_functionality failed");
1248+
return dev_err_probe(&i2c->dev, -ENXIO, "check_functionality failed");
12491249

12501250
aw88261 = devm_kzalloc(&i2c->dev, sizeof(*aw88261), GFP_KERNEL);
12511251
if (!aw88261)

0 commit comments

Comments
 (0)