Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: codecs: Fix error check in es8323_i2c_probe

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>
Link: https://patch.msgid.link/20241011073115.2384-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Tang Bin and committed by
Mark Brown
c1789209 a0aae96b

+1 -1
+1 -1
sound/soc/codecs/es8323.c
··· 743 743 struct device *dev = &i2c_client->dev; 744 744 745 745 es8323 = devm_kzalloc(dev, sizeof(*es8323), GFP_KERNEL); 746 - if (IS_ERR(es8323)) 746 + if (!es8323) 747 747 return -ENOMEM; 748 748 749 749 i2c_set_clientdata(i2c_client, es8323);