[PATCH] trivial compiler warning fix

From: Danny Kukawka
Date: Thu Jan 26 2012 - 13:36:03 EST


Fix for some -Wuninitialized compiler warnings.
---
drivers/leds/leds-lp5521.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index d62a798..21301f6 100644
--- a/drivers/leds/leds-lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -194,7 +194,7 @@ static int lp5521_load_program(struct lp5521_engine *eng, const u8 *pattern)
struct i2c_client *client = chip->client;
int ret;
int addr;
- u8 mode;
+ u8 mode = 0;

/* move current engine to direct mode and remember the state */
ret = lp5521_set_engine_mode(eng, LP5521_CMD_DIRECT);
@@ -646,7 +646,7 @@ static int __devinit lp5521_probe(struct i2c_client *client,
struct lp5521_chip *chip;
struct lp5521_platform_data *pdata;
int ret, i, led;
- u8 buf;
+ u8 buf = 0;

chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (!chip)
--
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/