Commit acd894ae authored by shengjiu wang's avatar shengjiu wang Committed by Mark Brown

ASoC: imx-hdmi: Fix warning of the uninitialized variable ret

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: default avatarshengjiu wang <shengjiu.wang@nxp.com>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Acked-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
Fixes: 6a5f850a ("ASoC: fsl: Add imx-hdmi machine driver")
Reviewed-by: default avatarFabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/1608115464-18710-1-git-send-email-shengjiu.wang@nxp.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent e49037ad
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment