Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Steve Twiss and committed by
Lee Jones
ba4a1c28 82d8eb40

+1 -1
+1 -1
include/linux/mfd/da9052/da9052.h
··· 171 171 static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg, 172 172 unsigned reg_cnt, unsigned char *val) 173 173 { 174 - int ret; 174 + int ret = 0; 175 175 int i; 176 176 177 177 for (i = 0; i < reg_cnt; i++) {