[PATCH 3/4] mfd: madera: Fix potential uninitialised use of variable

From: Charles Keepax
Date: Mon May 20 2019 - 05:09:12 EST


From: Stuart Henderson <stuarth@xxxxxxxxxxxxxxxxxxxxx>

regmap_read won't set val to anything if an ACKed bus fails.

Signed-off-by: Stuart Henderson <stuarth@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/mfd/madera-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/madera-core.c b/drivers/mfd/madera-core.c
index 2a77988d04625..1b78c5c844a81 100644
--- a/drivers/mfd/madera-core.c
+++ b/drivers/mfd/madera-core.c
@@ -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;

/*
--
2.11.0