Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: max98388: fix error code in probe()

This seems like a copy and paste bug. Return the correct variable.
It should be "ret" instead of PTR_ERR(max98388->regmap).

Fixes: 6a8e1d46f062 ("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>

authored by

Dan Carpenter and committed by
Mark Brown
02474880 1650e8a8

+1 -1
+1 -1
sound/soc/codecs/max98388.c
··· 960 960 ret = regmap_read(max98388->regmap, 961 961 MAX98388_R22FF_REV_ID, &reg); 962 962 if (ret < 0) 963 - return dev_err_probe(&i2c->dev, PTR_ERR(max98388->regmap), 963 + return dev_err_probe(&i2c->dev, ret, 964 964 "Failed to read the revision ID\n"); 965 965 966 966 dev_info(&i2c->dev, "MAX98388 revisionID: 0x%02X\n", reg);