diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-08-26 16:18:55 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-08-27 21:22:17 +0300 |
commit | a325c7bc3a92f1d5ba8cff10d7ab93a989cdeb80 (patch) | |
tree | 19edcdd9e2718f0637acf2c9cbd06af39b835414 /sound/soc/sof/imx | |
parent | 9ec05d4723bf83dd272cef5ccf508e5fe4d30fa3 (diff) | |
download | linux-a325c7bc3a92f1d5ba8cff10d7ab93a989cdeb80.tar.xz |
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: 202acc565a1f ("ASoC: SOF: imx: Add i.MX8 HW support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20190826131855.GA6840@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/imx')
-rw-r--r-- | sound/soc/sof/imx/imx8.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c index c9d849ced54a..2a22b18e5ec0 100644 --- a/sound/soc/sof/imx/imx8.c +++ b/sound/soc/sof/imx/imx8.c @@ -227,8 +227,8 @@ static int imx8_probe(struct snd_sof_dev *sdev) DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVE); - if (IS_ERR(priv->link[i])) { - ret = PTR_ERR(priv->link[i]); + if (!priv->link[i]) { + ret = -ENOMEM; dev_pm_domain_detach(priv->pd_dev[i], false); goto exit_unroll_pm; } |