All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: SOF: imx8: fix memory allocation failure check on priv->pd_dev
@ 2019-12-04 12:48 ` Colin King
  0 siblings, 0 replies; 16+ messages in thread
From: Colin King @ 2019-12-04 12:48 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Daniel Baluta, Pierre-Louis Bossart, alsa-devel,
	linux-arm-kernel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The memory allocation failure check for priv->pd_dev is incorrectly
pointer checking priv instead of priv->pd_dev. Fix this.

Addresses-Coverity: ("Logically dead code")
Fixes: 202acc565a1f ("ASoC: SOF: imx: Add i.MX8 HW support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 sound/soc/sof/imx/imx8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index cfefcfd92798..9d926b1df0d7 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -209,7 +209,7 @@ static int imx8_probe(struct snd_sof_dev *sdev)
 
 	priv->pd_dev = devm_kmalloc_array(&pdev->dev, priv->num_domains,
 					  sizeof(*priv->pd_dev), GFP_KERNEL);
-	if (!priv)
+	if (!priv->pd_dev)
 		return -ENOMEM;
 
 	priv->link = devm_kmalloc_array(&pdev->dev, priv->num_domains,
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-12-25  0:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-04 12:48 [PATCH] ASoC: SOF: imx8: fix memory allocation failure check on priv->pd_dev Colin King
2019-12-04 12:48 ` Colin King
2019-12-04 12:48 ` [alsa-devel] " Colin King
2019-12-04 12:48 ` Colin King
2019-12-04 12:56 ` Daniel Baluta
2019-12-04 12:56   ` Daniel Baluta
2019-12-04 12:56   ` [alsa-devel] " Daniel Baluta
2019-12-04 12:56   ` Daniel Baluta
2019-12-04 19:13 ` [alsa-devel] " Pierre-Louis Bossart
2019-12-04 19:13   ` Pierre-Louis Bossart
2019-12-04 19:13   ` Pierre-Louis Bossart
2019-12-04 19:13   ` Pierre-Louis Bossart
2019-12-25  0:09 ` Applied "ASoC: SOF: imx8: fix memory allocation failure check on priv->pd_dev" to the asoc tree Mark Brown
2019-12-25  0:09   ` Mark Brown
2019-12-25  0:09   ` [alsa-devel] " Mark Brown
2019-12-25  0:09   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.