All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: fsl: imx-hdmi: Fix an uninitialized return in probe
@ 2020-12-11 10:13 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2020-12-11 10:13 UTC (permalink / raw)
  To: Timur Tabi, Shengjiu Wang
  Cc: alsa-devel, linuxppc-dev, Xiubo Li, Shawn Guo, Sascha Hauer,
	Takashi Iwai, kernel-janitors, Liam Girdwood, Nicolin Chen,
	Mark Brown, NXP Linux Team, Pengutronix Kernel Team,
	Fabio Estevam

The "ret" variable should be set to a negative error code but
currently it returns uninitialized stack data.

Fixes: 6a5f850aa83a ("ASoC: fsl: Add imx-hdmi machine driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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.29.2

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

* [PATCH] ASoC: fsl: imx-hdmi: Fix an uninitialized return in probe
@ 2020-12-11 10:13 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2020-12-11 10:13 UTC (permalink / raw)
  To: Timur Tabi, Shengjiu Wang
  Cc: alsa-devel, linuxppc-dev, Xiubo Li, Shawn Guo, Sascha Hauer,
	Takashi Iwai, kernel-janitors, Liam Girdwood, Nicolin Chen,
	Mark Brown, NXP Linux Team, Pengutronix Kernel Team,
	Fabio Estevam

The "ret" variable should be set to a negative error code but
currently it returns uninitialized stack data.

Fixes: 6a5f850aa83a ("ASoC: fsl: Add imx-hdmi machine driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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.29.2


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

* [PATCH] ASoC: fsl: imx-hdmi: Fix an uninitialized return in probe
@ 2020-12-11 10:13 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2020-12-11 10:13 UTC (permalink / raw)
  To: Timur Tabi, Shengjiu Wang
  Cc: alsa-devel, linuxppc-dev, Xiubo Li, Shawn Guo, Sascha Hauer,
	Takashi Iwai, kernel-janitors, Liam Girdwood, Jaroslav Kysela,
	Nicolin Chen, Mark Brown, NXP Linux Team,
	Pengutronix Kernel Team, Fabio Estevam

The "ret" variable should be set to a negative error code but
currently it returns uninitialized stack data.

Fixes: 6a5f850aa83a ("ASoC: fsl: Add imx-hdmi machine driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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.29.2


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

end of thread, other threads:[~2020-12-11 11:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11 10:13 [PATCH] ASoC: fsl: imx-hdmi: Fix an uninitialized return in probe Dan Carpenter
2020-12-11 10:13 ` Dan Carpenter
2020-12-11 10:13 ` Dan Carpenter

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.