MLK-17355-1: ASoC: fsl_mqs: Fix potential uninitialized pointer read
authorViorel Suman <viorel.suman@nxp.com>
Tue, 9 Jan 2018 14:01:49 +0000 (16:01 +0200)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:52:37 +0000 (14:52 -0500)
Initialize gpr_np in order to avoid potential unitialized
pointer read in the section following the "out:" label.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
sound/soc/codecs/fsl_mqs.c

index 745dc13..d2890d6 100644 (file)
@@ -204,7 +204,7 @@ static const struct regmap_config fsl_mqs_regmap_config = {
 static int fsl_mqs_probe(struct platform_device *pdev)
 {
        struct device_node *np = pdev->dev.of_node;
-       struct device_node *gpr_np;
+       struct device_node *gpr_np = 0;
        struct fsl_mqs *mqs_priv;
        struct resource *res;
        void __iomem *regs;