Skip to content

Commit

Permalink
ASoC: max98388: fix error code in probe()
Browse files Browse the repository at this point in the history
This seems like a copy and paste bug.  Return the correct variable.
It should be "ret" instead of PTR_ERR(max98388->regmap).

Fixes: 6a8e1d4 ("ASoC: max98388: add amplifier driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/d44c8388-b12b-4045-95de-0d4bc7b428ac@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Dan Carpenter authored and Mark Brown committed Jun 19, 2023
1 parent 1650e8a commit 0247488
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/max98388.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ static int max98388_i2c_probe(struct i2c_client *i2c)
ret = regmap_read(max98388->regmap,
MAX98388_R22FF_REV_ID, &reg);
if (ret < 0)
return dev_err_probe(&i2c->dev, PTR_ERR(max98388->regmap),
return dev_err_probe(&i2c->dev, ret,
"Failed to read the revision ID\n");

dev_info(&i2c->dev, "MAX98388 revisionID: 0x%02X\n", reg);
Expand Down

0 comments on commit 0247488

Please sign in to comment.