diff options
| author | shengjiu wang <[email protected]> | 2020-12-16 18:44:24 +0800 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2020-12-16 13:53:52 +0000 |
| commit | acd894aee3149c15847bc4f0690fccba59ced5e7 (patch) | |
| tree | a2a70d5b4ab8715696838fb6cbec99256e5d78f8 | |
| parent | e49037ad12e47cd34239b99b010c5438844923af (diff) | |
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: shengjiu wang <[email protected]>
Reported-by: kernel test robot <[email protected]>
Acked-by: Nicolin Chen <[email protected]>
Fixes: 6a5f850aa83a ("ASoC: fsl: Add imx-hdmi machine driver")
Reviewed-by: Fabio Estevam <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
| -rw-r--r-- | sound/soc/fsl/imx-hdmi.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |