All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: SOF: imx8: Fix an is IS_ERR() vs NULL check
@ 2019-08-26 13:18 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2019-08-26 13:18 UTC (permalink / raw)
  To: Liam Girdwood, Daniel Baluta
  Cc: Pierre-Louis Bossart, alsa-devel, Fabio Estevam, Sascha Hauer,
	kernel-janitors, Takashi Iwai, Mark Brown, NXP Linux Team,
	Pengutronix Kernel Team, Shawn Guo

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>
---
 sound/soc/sof/imx/imx8.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index e502f584207f..41ad3a310808 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;
 		}
-- 
2.20.1

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

end of thread, other threads:[~2019-08-27 19:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-26 13:18 [PATCH] ASoC: SOF: imx8: Fix an is IS_ERR() vs NULL check Dan Carpenter
2019-08-26 13:18 ` Dan Carpenter
2019-08-26 13:23 ` Daniel Baluta
2019-08-26 13:23   ` Daniel Baluta
2019-08-27 19:58 ` Applied "ASoC: SOF: imx8: Fix an is IS_ERR() vs NULL check" to the asoc tree Mark Brown
2019-08-27 19:58   ` 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.