2019-05-20 10:19:59

by Charles Keepax

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

From: Stuart Henderson <[email protected]>

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

Signed-off-by: Stuart Henderson <[email protected]>
Signed-off-by: Charles Keepax <[email protected]>
---
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



2019-06-12 08:54:35

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 3/4] mfd: madera: Fix potential uninitialised use of variable

On Mon, 20 May 2019, Charles Keepax wrote:

> From: Stuart Henderson <[email protected]>
>
> regmap_read won't set val to anything if an ACKed bus fails.
>
> Signed-off-by: Stuart Henderson <[email protected]>
> Signed-off-by: Charles Keepax <[email protected]>
> ---
> drivers/mfd/madera-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog