From: Steve Twiss Date: Mon, 27 Jun 2016 15:06:36 +0000 (+0100) Subject: mfd: da9053: Fix compiler warning message for uninitialised variable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ba4a1c28a92df55b9263e838068b92eaa80c7850;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reported-by: Geert Uytterhoeven Signed-off-by: Lee Jones --- diff --git a/include/linux/mfd/da9052/da9052.h b/include/linux/mfd/da9052/da9052.h index c18a4c19d6fc..ce9230af09c2 100644 --- a/include/linux/mfd/da9052/da9052.h +++ b/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++) {