Skip to content

Commit eaa0348

Browse files
rfvirgilbroonie
authored andcommitted
regmap: maple: Fix uninitialized symbol 'ret' warnings
Fix warnings reported by smatch by initializing local 'ret' variable to 0. drivers/base/regmap/regcache-maple.c:186 regcache_maple_drop() error: uninitialized symbol 'ret'. drivers/base/regmap/regcache-maple.c:290 regcache_maple_sync() error: uninitialized symbol 'ret'. Signed-off-by: Richard Fitzgerald <[email protected]> Fixes: f033c26 ("regmap: Add maple tree based register cache") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 00bb549 commit eaa0348

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/base/regmap/regcache-maple.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static int regcache_maple_drop(struct regmap *map, unsigned int min,
112112
unsigned long *entry, *lower, *upper;
113113
unsigned long lower_index, lower_last;
114114
unsigned long upper_index, upper_last;
115-
int ret;
115+
int ret = 0;
116116

117117
lower = NULL;
118118
upper = NULL;
@@ -244,7 +244,7 @@ static int regcache_maple_sync(struct regmap *map, unsigned int min,
244244
unsigned long lmin = min;
245245
unsigned long lmax = max;
246246
unsigned int r, v, sync_start;
247-
int ret;
247+
int ret = 0;
248248
bool sync_needed = false;
249249

250250
map->cache_bypass = true;

0 commit comments

Comments
 (0)