From: Zidan Wang Date: Fri, 27 Nov 2015 03:14:36 +0000 (+0800) Subject: MLK-11915-05 ASoC: imx-wm8958: init codec_np to avoid wild pointer X-Git-Tag: C0P2-H0.0--20200415~4006 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=8ee9683f38b358329935881615dc80d4bbd1b371;p=linux.git MLK-11915-05 ASoC: imx-wm8958: init codec_np to avoid wild pointer init codec_np to avoid wild pointer. Reported by Coverity. Signed-off-by: Zidan Wang (cherry picked from commit 76665930654867cf38a86ba747a9f8a5bf2665e2) --- diff --git a/sound/soc/fsl/imx-wm8958.c b/sound/soc/fsl/imx-wm8958.c index a5138c1fa7c5..273a514eab1e 100644 --- a/sound/soc/fsl/imx-wm8958.c +++ b/sound/soc/fsl/imx-wm8958.c @@ -403,7 +403,7 @@ static int imx_wm8958_set_bias_level_post(struct snd_soc_card *card, static int imx_wm8958_probe(struct platform_device *pdev) { - struct device_node *cpu_np, *codec_np, *gpr_np; + struct device_node *cpu_np, *codec_np = NULL, *gpr_np; struct device_node *np = pdev->dev.of_node; struct platform_device *cpu_pdev; struct imx_priv *priv = &card_priv;