Skip to content

Commit

Permalink
mfd: rc5t583: Fix warning messages
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Venu Byravarasu authored and Samuel Ortiz committed Sep 23, 2012
1 parent a361cd9 commit 0dd9636
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/mfd/rc5t583-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static irqreturn_t rc5t583_irq(int irq, void *data)
{
struct rc5t583 *rc5t583 = data;
uint8_t int_sts[RC5T583_MAX_INTERRUPT_MASK_REGS];
uint8_t master_int;
uint8_t master_int = 0;
int i;
int ret;
unsigned int rtc_int_sts = 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/rc5t583.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static int __rc5t583_set_ext_pwrreq1_control(struct device *dev,
int id, int ext_pwr, int slots)
{
int ret;
uint8_t sleepseq_val;
uint8_t sleepseq_val = 0;
unsigned int en_bit;
unsigned int slot_bit;

Expand Down

0 comments on commit 0dd9636

Please sign in to comment.