Commit a325c7bc authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown

ASoC: SOF: imx8: Fix an is IS_ERR() vs NULL check

The device_link_add() function only returns NULL on error, it doesn't
return error pointers.

Fixes: 202acc56 ("ASoC: SOF: imx: Add i.MX8 HW support")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarDaniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20190826131855.GA6840@mwandaSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9ec05d47
...@@ -227,8 +227,8 @@ static int imx8_probe(struct snd_sof_dev *sdev) ...@@ -227,8 +227,8 @@ static int imx8_probe(struct snd_sof_dev *sdev)
DL_FLAG_STATELESS | DL_FLAG_STATELESS |
DL_FLAG_PM_RUNTIME | DL_FLAG_PM_RUNTIME |
DL_FLAG_RPM_ACTIVE); DL_FLAG_RPM_ACTIVE);
if (IS_ERR(priv->link[i])) { if (!priv->link[i]) {
ret = PTR_ERR(priv->link[i]); ret = -ENOMEM;
dev_pm_domain_detach(priv->pd_dev[i], false); dev_pm_domain_detach(priv->pd_dev[i], false);
goto exit_unroll_pm; goto exit_unroll_pm;
} }
......
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