]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
mfd: da9053: Fix compiler warning message for uninitialised variable
authorSteve Twiss <stwiss.opensource@diasemi.com>
Mon, 27 Jun 2016 15:06:36 +0000 (16:06 +0100)
committerLee Jones <lee.jones@linaro.org>
Thu, 30 Jun 2016 06:44:23 +0000 (07:44 +0100)
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>
include/linux/mfd/da9052/da9052.h

index c18a4c19d6fcedcd66adebdb45c383af09930408..ce9230af09c20c0498e1111fdf148b8f6406b30e 100644 (file)
@@ -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++) {