alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: imx-hdmi: Fix warning of the uninitialized variable ret
@ 2020-12-16 10:44 Shengjiu Wang
  2020-12-16 11:06 ` Nicolin Chen
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Shengjiu Wang @ 2020-12-16 10:44 UTC (permalink / raw)
  To: timur, nicoleotsuka, Xiubo.Lee, festevam, broonie, perex, tiwai,
	alsa-devel
  Cc: linuxppc-dev, linux-kernel

From: shengjiu wang <shengjiu.wang@nxp.com>

When condition ((hdmi_out && hdmi_in) || (!hdmi_out && !hdmi_in))
is true, then goto fail, the uninitialized variable ret will be
returned.

Signed-off-by: shengjiu wang <shengjiu.wang@nxp.com>
Reported-by: kernel test robot <lkp@intel.com>
---
 sound/soc/fsl/imx-hdmi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/fsl/imx-hdmi.c b/sound/soc/fsl/imx-hdmi.c
index 2c2a76a71940..ede4a9ad1054 100644
--- a/sound/soc/fsl/imx-hdmi.c
+++ b/sound/soc/fsl/imx-hdmi.c
@@ -164,6 +164,7 @@ static int imx_hdmi_probe(struct platform_device *pdev)
 
 	if ((hdmi_out && hdmi_in) || (!hdmi_out && !hdmi_in)) {
 		dev_err(&pdev->dev, "Invalid HDMI DAI link\n");
+		ret = -EINVAL;
 		goto fail;
 	}
 
-- 
2.17.1


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

end of thread, other threads:[~2021-01-12 20:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 10:44 [PATCH] ASoC: imx-hdmi: Fix warning of the uninitialized variable ret Shengjiu Wang
2020-12-16 11:06 ` Nicolin Chen
2020-12-16 11:26 ` Fabio Estevam
2020-12-16 15:52 ` Mark Brown
2021-01-12 18:19 ` Nathan Chancellor
2021-01-12 18:48   ` Mark Brown
2021-01-12 19:09     ` Nathan Chancellor
2021-01-12 20:44       ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).