diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2023-06-19 12:46:48 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-06-19 12:59:34 +0100 |
commit | 02474880e8fdd8533f21da4264a7ebfce8196be7 (patch) | |
tree | 7aefa0b12e4f6328850fcfb13d03942647a2c0ed /sound | |
parent | 1650e8a8818d516219b2c0cbc203f53cc6cd77a0 (diff) | |
download | linux-02474880e8fdd8533f21da4264a7ebfce8196be7.tar.gz linux-02474880e8fdd8533f21da4264a7ebfce8196be7.tar.bz2 linux-02474880e8fdd8533f21da4264a7ebfce8196be7.zip |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/max98388.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/max98388.c b/sound/soc/codecs/max98388.c index 1fd50e56ecae..cde5e85946cb 100644 --- a/sound/soc/codecs/max98388.c +++ b/sound/soc/codecs/max98388.c @@ -960,7 +960,7 @@ static int max98388_i2c_probe(struct i2c_client *i2c) ret = regmap_read(max98388->regmap, MAX98388_R22FF_REV_ID, ®); 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); |