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

mfd: rc5t583: Fix warning messages

Two variables named master_int and sleepseq_val, were just
declared without initialization. Pointers to these variables
were passed to mfd read function. After that these variables
were used for some of the logical operations.

Though logically there is nothing wrong, compiler is complaining
that the variables may be used uninitialized.

Hence fixing these warning messages by initializing them.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

authored by

Venu Byravarasu and committed by
Samuel Ortiz
0dd96360 a361cd9f

+2 -2
+1 -1
drivers/mfd/rc5t583-irq.c
··· 255 255 { 256 256 struct rc5t583 *rc5t583 = data; 257 257 uint8_t int_sts[RC5T583_MAX_INTERRUPT_MASK_REGS]; 258 - uint8_t master_int; 258 + uint8_t master_int = 0; 259 259 int i; 260 260 int ret; 261 261 unsigned int rtc_int_sts = 0;
+1 -1
drivers/mfd/rc5t583.c
··· 85 85 int id, int ext_pwr, int slots) 86 86 { 87 87 int ret; 88 - uint8_t sleepseq_val; 88 + uint8_t sleepseq_val = 0; 89 89 unsigned int en_bit; 90 90 unsigned int slot_bit; 91 91