[PATCH] regmap: Add missing initialization of this_page

From: Geert Uytterhoeven
Date: Tue Apr 22 2014 - 06:48:15 EST


drivers/base/regmap/regmap.c: In function â_regmap_range_multi_paged_reg_writeâ:
drivers/base/regmap/regmap.c:1665: warning: âthis_pageâ may be used uninitialized in this function

Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
---
This may be a false positive, if "range" is guaranteed to be non-zero
during the first iteration of the loop
---
drivers/base/regmap/regmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 63e30ef096e2..0eaf581b2bb6 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1662,7 +1662,7 @@ static int _regmap_range_multi_paged_reg_write(struct regmap *map,
int ret;
int i, n;
struct reg_default *base;
- unsigned int this_page;
+ unsigned int this_page = 0;
/*
* the set of registers are not neccessarily in order, but
* since the order of write must be preserved this algorithm
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/