* [PATCH] ASoC: codecs: Fix error check in es8323_i2c_probe
@ 2024-10-11 7:31 Tang Bin
2024-10-11 12:59 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Tang Bin @ 2024-10-11 7:31 UTC (permalink / raw)
To: lgirdwood, broonie, perex, tiwai; +Cc: linux-sound, linux-kernel, Tang Bin
In the function es8323_i2c_probe(), devm_kzalloc() could
possibly return NULL pointer, so IS_ERR() is wrong check
in this place, thus fix it.
Fixes: b97391a604b9 ("ASoC: codecs: Add support for ES8323")
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
sound/soc/codecs/es8323.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/es8323.c b/sound/soc/codecs/es8323.c
index c09bd92b2..6f4fa36ea 100644
--- a/sound/soc/codecs/es8323.c
+++ b/sound/soc/codecs/es8323.c
@@ -743,7 +743,7 @@ static int es8323_i2c_probe(struct i2c_client *i2c_client)
struct device *dev = &i2c_client->dev;
es8323 = devm_kzalloc(dev, sizeof(*es8323), GFP_KERNEL);
- if (IS_ERR(es8323))
+ if (!es8323)
return -ENOMEM;
i2c_set_clientdata(i2c_client, es8323);
--
2.33.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: codecs: Fix error check in es8323_i2c_probe
2024-10-11 7:31 [PATCH] ASoC: codecs: Fix error check in es8323_i2c_probe Tang Bin
@ 2024-10-11 12:59 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-10-11 12:59 UTC (permalink / raw)
To: lgirdwood, perex, tiwai, Tang Bin; +Cc: linux-sound, linux-kernel
On Fri, 11 Oct 2024 15:31:15 +0800, Tang Bin wrote:
> In the function es8323_i2c_probe(), devm_kzalloc() could
> possibly return NULL pointer, so IS_ERR() is wrong check
> in this place, thus fix it.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: codecs: Fix error check in es8323_i2c_probe
commit: c1789209701143b50cba3783fa800a23df30a088
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-11 12:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-11 7:31 [PATCH] ASoC: codecs: Fix error check in es8323_i2c_probe Tang Bin
2024-10-11 12:59 ` 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®