aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinidhi KASAGAR <srinidhi.kasagar@stericsson.com>2012-03-23 18:02:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 19:58:35 -0400
commit42960b76d2c6a44d7e8000f4eb9a4ca1780059ff (patch)
tree6e9855e8050dd86daf1b8fcd4e490d74d4365d53
parent32a2f747ddf58b0f9ad786c4f3853b1ca7750cf9 (diff)
drivers/leds/leds-lp5521.c: ret may be uninitialized
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>
-rw-r--r--drivers/leds/leds-lp5521.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index de7b8fe676df..410a723b8691 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,
784 * otherwise further access to the R G B channels in the 784 * otherwise further access to the R G B channels in the
785 * LP5521_REG_ENABLE register will not have any effect - strange! 785 * LP5521_REG_ENABLE register will not have any effect - strange!
786 */ 786 */
787 lp5521_read(client, LP5521_REG_R_CURRENT, &buf); 787 ret = lp5521_read(client, LP5521_REG_R_CURRENT, &buf);
788 if (buf != LP5521_REG_R_CURR_DEFAULT) { 788 if (buf != LP5521_REG_R_CURR_DEFAULT) {
789 dev_err(&client->dev, "error in resetting chip\n"); 789 dev_err(&client->dev, "error in resetting chip\n");
790 goto fail2; 790 goto fail2;