Skip to content

Commit

Permalink
drivers/leds/leds-lp5521.c: ret may be uninitialized
Browse files Browse the repository at this point in the history
Fix it by assigning the lp5521_read return value.

Signed-off-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
Cc: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Arun MURTHY <arun.murthy@stericsson.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Srinidhi KASAGAR authored and Linus Torvalds committed Mar 23, 2012
1 parent 32a2f74 commit 42960b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/leds/leds-lp5521.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ static int __devinit lp5521_probe(struct i2c_client *client,
* otherwise further access to the R G B channels in the
* LP5521_REG_ENABLE register will not have any effect - strange!
*/
lp5521_read(client, LP5521_REG_R_CURRENT, &buf);
ret = lp5521_read(client, LP5521_REG_R_CURRENT, &buf);
if (buf != LP5521_REG_R_CURR_DEFAULT) {
dev_err(&client->dev, "error in resetting chip\n");
goto fail2;
Expand Down

0 comments on commit 42960b7

Please sign in to comment.