Skip to content

Commit a325c7b

Browse files
Dan Carpenterbroonie
authored andcommitted
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: 202acc5 ("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>
1 parent 9ec05d4 commit a325c7b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎sound/soc/sof/imx/imx8.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ static int imx8_probe(struct snd_sof_dev *sdev)
227227
DL_FLAG_STATELESS |
228228
DL_FLAG_PM_RUNTIME |
229229
DL_FLAG_RPM_ACTIVE);
230-
if (IS_ERR(priv->link[i])) {
231-
ret = PTR_ERR(priv->link[i]);
230+
if (!priv->link[i]) {
231+
ret = -ENOMEM;
232232
dev_pm_domain_detach(priv->pd_dev[i], false);
233233
goto exit_unroll_pm;
234234
}

0 commit comments

Comments
 (0)