linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regmap: Fix compile warning with value uninitialized
@ 2013-11-09  9:49 Caizhiyong
  2013-11-09 15:16 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Caizhiyong @ 2013-11-09  9:49 UTC (permalink / raw)
  To: Mark Brown
  Cc: Greg Kroah-Hartman, linux-kernel@vger.kernel.org,
	Wanglin (Albert)

From: Cai Zhiyong <caizhiyong@huawei.com>
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@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-11-09 19:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-09  9:49 [PATCH] regmap: Fix compile warning with value uninitialized Caizhiyong
2013-11-09 15:16 ` Mark Brown
2013-11-09 15:34   ` Levente Kurusa
2013-11-09 16:15     ` Greg Kroah-Hartman
2013-11-09 18:57     ` Mark Brown
2013-11-09 19:02       ` Levente Kurusa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).