lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241011073115.2384-1-tangbin@cmss.chinamobile.com>
Date: Fri, 11 Oct 2024 15:31:15 +0800
From: Tang Bin <tangbin@...s.chinamobile.com>
To: lgirdwood@...il.com,
	broonie@...nel.org,
	perex@...ex.cz,
	tiwai@...e.com
Cc: linux-sound@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Tang Bin <tangbin@...s.chinamobile.com>
Subject: [PATCH] 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@...s.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




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ