[PATCH] fix return value from __devinit

From: Danny Kukawka
Date: Thu Jan 26 2012 - 13:40:50 EST


Fix return value from __devinit and -Wuninitialized compiler
warning.
---
drivers/leds/leds-lp5521.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index 21301f6..b3ee64c 100644
--- a/drivers/leds/leds-lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -695,6 +695,7 @@ static int __devinit lp5521_probe(struct i2c_client *client,
lp5521_read(client, LP5521_REG_R_CURRENT, &buf);
if (buf != LP5521_REG_R_CURR_DEFAULT) {
dev_err(&client->dev, "error in reseting chip\n");
+ ret = -EIO;
goto fail2;
}
usleep_range(10000, 20000);
--
1.7.7.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/