mfd: madera: Fix potential uninitialised use of variable
authorStuart Henderson <stuarth@opensource.cirrus.com>
Mon, 20 May 2019 09:06:27 +0000 (10:06 +0100)
committerLee Jones <lee.jones@linaro.org>
Tue, 2 Jul 2019 11:11:31 +0000 (12:11 +0100)
regmap_read won't set val to anything if an ACKed bus fails.

Signed-off-by: Stuart Henderson <stuarth@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/madera-core.c

index 826b971ccb865fc10846c10f3d63036ba4559a12..dcc5c28925f223801d0855b427bd2f358b4529ab 100644 (file)
@@ -139,7 +139,7 @@ EXPORT_SYMBOL_GPL(madera_name_from_type);
 static int madera_wait_for_boot(struct madera *madera)
 {
        ktime_t timeout;
-       unsigned int val;
+       unsigned int val = 0;
        int ret = 0;
 
        /*