diff mbox series

[next] ASoC: codecs: fix error code in ntp8835_i2c_probe()

Message ID 20241023144421.1720234-1-harshit.m.mogalapalli@oracle.com (mailing list archive)
State Accepted
Commit 9c2e48ee9aa64f609709eeb120cf728d66d4a145
Headers show
Series [next] ASoC: codecs: fix error code in ntp8835_i2c_probe() | expand

Commit Message

Harshit Mogalapalli Oct. 23, 2024, 2:44 p.m. UTC
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(-)

Comments

Mark Brown Oct. 23, 2024, 5:07 p.m. UTC | #1
On Wed, 23 Oct 2024 07:44:11 -0700, Harshit Mogalapalli wrote:
> 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).
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: codecs: fix error code in ntp8835_i2c_probe()
      commit: 9c2e48ee9aa64f609709eeb120cf728d66d4a145

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
diff mbox series

Patch

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);