mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH next] ASoC: codecs: fix error code in ntp8835_i2c_probe()
@ 2024-10-23 14:44 Harshit Mogalapalli
  2024-10-23 17:07 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Harshit Mogalapalli @ 2024-10-23 14:44 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Philipp Zabel, Igor Prusov, Harshit Mogalapalli, linux-sound,
	linux-kernel
  Cc: dan.carpenter, kernel-janitors, error27, kernel test robot

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@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202409281054.DUTb5KxU-lkp@intel.com/
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-23 17:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-23 14:44 [PATCH next] ASoC: codecs: fix error code in ntp8835_i2c_probe() Harshit Mogalapalli
2024-10-23 17:07 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®