[PATCH] regmap: Fix compile warning with value uninitialized

From: Caizhiyong
Date: Sat Nov 09 2013 - 04:49:54 EST


From: Cai Zhiyong <caizhiyong@xxxxxxxxxx>
Date: Sat, 9 Nov 2013 14:14:36 +0800
Subject: [PATCH] regmap: Fix compile warning with value uninitialized

Fix compile warning with value uninitialized:
drivers/base/regmap/regmap.c:2173: warning: 'ret' may be used uninitialized in this function

Signed-off-by: Cai Zhiyong <caizhiyong@xxxxxxxxxx>
---
drivers/base/regmap/regmap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 9c021d9..4fac073 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -2170,7 +2170,8 @@ int regmap_register_patch(struct regmap *map, const struct reg_default *regs,
int num_regs)
{
struct reg_default *p;
- int i, ret;
+ int i;
+ int ret = 0;
bool bypass;

map->lock(map->lock_arg);
--
1.8.1.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/