diff --git a/arch/arm64/include/asm/percpu.h b/arch/arm64/include/asm/percpu.h index 1abad2315fa9..42b7808f0d70 100644 --- a/arch/arm64/include/asm/percpu.h +++ b/arch/arm64/include/asm/percpu.h @@ -49,7 +49,7 @@ static inline unsigned long __my_cpu_offset(void) static inline unsigned long __percpu_##op(void *ptr, \ unsigned long val, int size) \ { \ - unsigned long loop, ret; \ + unsigned long loop, ret = 0; \ \ switch (size) { \ case 1: \ @@ -107,7 +107,7 @@ PERCPU_OP(or, orr) static inline unsigned long __percpu_read(void *ptr, int size) { - unsigned long ret; + unsigned long ret = 0; switch (size) { case 1: @@ -153,7 +153,7 @@ static inline void __percpu_write(void *ptr, unsigned long val, int size) static inline unsigned long __percpu_xchg(void *ptr, unsigned long val, int size) { - unsigned long ret, loop; + unsigned long ret = 0, loop; switch (size) { case 1: diff --git a/drivers/misc/mediatek/pmic/mt6357/v1/pmic_throttling_dlpt.c b/drivers/misc/mediatek/pmic/mt6357/v1/pmic_throttling_dlpt.c index cb570d49ca24..d065c9369199 100644 --- a/drivers/misc/mediatek/pmic/mt6357/v1/pmic_throttling_dlpt.c +++ b/drivers/misc/mediatek/pmic/mt6357/v1/pmic_throttling_dlpt.c @@ -1229,7 +1229,7 @@ static ssize_t store_low_battery_protect_ut( int ret = 0; char *pvalue = NULL; unsigned int val = 0; - unsigned int thd; + unsigned int thd = 0; pr_info("[%s]\n", __func__);