From: Dan Carpenter Date: Fri, 11 Dec 2020 10:13:21 +0000 Subject: [PATCH] ASoC: fsl: imx-hdmi: Fix an uninitialized return in probe Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Timur Tabi , Shengjiu Wang Cc: alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, Xiubo Li , Shawn Guo , Sascha Hauer , Takashi Iwai , kernel-janitors@vger.kernel.org, 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 --- 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