From: Takashi Iwai Date: Tue, 7 Oct 2014 16:19:53 +0000 (+0200) Subject: ASoC: imx-es8328: Fix of_node_put() call with uninitialized object X-Git-Tag: firefly_0821_release~176^2~2610^2~82^2^3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=960baba41f3cfb0a97bb1f0e720334156b2eff75;p=firefly-linux-kernel-4.4.55.git ASoC: imx-es8328: Fix of_node_put() call with uninitialized object The of_node_put() calls in imx_es8328_probe() may take uninitialized pointers when reached though the early error path. This patch adds the proper NULL initialization for fixing these. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown --- diff --git a/sound/soc/fsl/imx-es8328.c b/sound/soc/fsl/imx-es8328.c index 653e66d150c8..d6c55c88a069 100644 --- a/sound/soc/fsl/imx-es8328.c +++ b/sound/soc/fsl/imx-es8328.c @@ -78,7 +78,7 @@ static const struct snd_soc_dapm_widget imx_es8328_dapm_widgets[] = { static int imx_es8328_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - struct device_node *ssi_np, *codec_np; + struct device_node *ssi_np = NULL, *codec_np = NULL; struct platform_device *ssi_pdev; struct imx_es8328_data *data; u32 int_port, ext_port;