浏览代码

mfd: da9053: Fix compiler warning message for uninitialised variable

Fix compiler warning caused by an uninitialised variable inside
da9052_group_write() function. Defaulting the value to zero covers
the trivial case.

Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Steve Twiss 9 年之前
父节点
当前提交
ba4a1c28a9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/linux/mfd/da9052/da9052.h

+ 1 - 1
include/linux/mfd/da9052/da9052.h

@@ -171,7 +171,7 @@ static inline int da9052_group_read(struct da9052 *da9052, unsigned char reg,
 static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg,
 				      unsigned reg_cnt, unsigned char *val)
 {
-	int ret;
+	int ret = 0;
 	int i;
 
 	for (i = 0; i < reg_cnt; i++) {