[PATCH] 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 --- sound/soc/codecs/max98388.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/max98388.c b/sound/soc/codecs/max98388.c index 8062a7115007..74fbaf7d7c39 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);
On Mon, 19 Jun 2023 12:46:48 +0300, Dan Carpenter wrote:
This seems like a copy and paste bug. Return the correct variable. It should be "ret" instead of PTR_ERR(max98388->regmap).
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: max98388: fix error code in probe() commit: 02474880e8fdd8533f21da4264a7ebfce8196be7
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
participants (1)
-
Dan Carpenter
-
Mark Brown