[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241023144421.1720234-1-harshit.m.mogalapalli@oracle.com>
Date: Wed, 23 Oct 2024 07:44:11 -0700
From: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
To: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Igor Prusov <ivprusov@...utedevices.com>,
Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>,
linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: dan.carpenter@...aro.org, kernel-janitors@...r.kernel.org,
error27@...il.com, kernel test robot <lkp@...el.com>
Subject: [PATCH next] ASoC: codecs: fix error code in ntp8835_i2c_probe()
When reset_control_deassert() fails it returns valid error codes stored
in return, pass that to dev_err_probe() instead of
PTR_ERR(ntp8835->reset).
Fixes: dc9004ea273a ("ASoC: codecs: Add NeoFidelity NTP8835 codec")
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
Closes: https://lore.kernel.org/r/202409281054.DUTb5KxU-lkp@intel.com/
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
---
Based on static analysis, with smatch, only compile tested
---
sound/soc/codecs/ntp8835.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/ntp8835.c b/sound/soc/codecs/ntp8835.c
index 800bda6b49dd..796e1410496f 100644
--- a/sound/soc/codecs/ntp8835.c
+++ b/sound/soc/codecs/ntp8835.c
@@ -428,7 +428,7 @@ static int ntp8835_i2c_probe(struct i2c_client *i2c)
ret = reset_control_deassert(ntp8835->reset);
if (ret)
- return dev_err_probe(&i2c->dev, PTR_ERR(ntp8835->reset),
+ return dev_err_probe(&i2c->dev, ret,
"Failed to deassert reset\n");
dev_set_drvdata(&i2c->dev, ntp8835);
--
2.39.3
Powered by blists - more mailing lists