diff options
author | Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> | 2024-10-23 16:44:11 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-10-23 17:30:54 +0200 |
commit | 9c2e48ee9aa64f609709eeb120cf728d66d4a145 (patch) | |
tree | 7d38edd48b0cdd5979423c94115f794b83c86f52 /sound/soc | |
parent | ASoC: SOF: core: Module parameter updates (diff) | |
download | linux-9c2e48ee9aa64f609709eeb120cf728d66d4a145.tar.xz linux-9c2e48ee9aa64f609709eeb120cf728d66d4a145.zip |
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@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>
Link: https://patch.msgid.link/20241023144421.1720234-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/ntp8835.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |