Commit 98910e1d authored by Colin Ian King's avatar Colin Ian King Committed by Mark Brown

ASoC: SOF: imx8: fix memory allocation failure check on priv->pd_dev

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: 202acc56 ("ASoC: SOF: imx: Add i.MX8 HW support")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarDaniel Baluta <daniel.baluta@nxp.com>
Acked-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191204124816.1415359-1-colin.king@canonical.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 921162c8
...@@ -209,7 +209,7 @@ static int imx8_probe(struct snd_sof_dev *sdev) ...@@ -209,7 +209,7 @@ static int imx8_probe(struct snd_sof_dev *sdev)
priv->pd_dev = devm_kmalloc_array(&pdev->dev, priv->num_domains, priv->pd_dev = devm_kmalloc_array(&pdev->dev, priv->num_domains,
sizeof(*priv->pd_dev), GFP_KERNEL); sizeof(*priv->pd_dev), GFP_KERNEL);
if (!priv) if (!priv->pd_dev)
return -ENOMEM; return -ENOMEM;
priv->link = devm_kmalloc_array(&pdev->dev, priv->num_domains, priv->link = devm_kmalloc_array(&pdev->dev, priv->num_domains,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment