From: Srinidhi KASAGAR Date: Fri, 23 Mar 2012 22:02:09 +0000 (-0700) Subject: drivers/leds/leds-lp5521.c: ret may be uninitialized X-Git-Tag: v3.4-rc1~109^2~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42960b76d2c6a44d7e8000f4eb9a4ca1780059ff;p=platform%2Fkernel%2Flinux-3.10.git drivers/leds/leds-lp5521.c: ret may be uninitialized Fix it by assigning the lp5521_read return value. Signed-off-by: srinidhi kasagar Cc: Milo(Woogyom) Kim Cc: Linus Walleij Cc: Arun MURTHY Cc: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index de7b8fe..410a723 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c @@ -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;