Home
last modified time | relevance | path

Searched hist:fa0ea0e16f748e36d65931227188ccf07f2b77c7 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/leds/
H A Dleds-lp5521.cdiff fa0ea0e16f748e36d65931227188ccf07f2b77c7 Mon Oct 31 19:12:12 CDT 2011 Axel Lin <axel.lin@gmail.com> drivers/leds/leds-lp5521.c: avoid writing uninitialized value to LP5521_REG_OP_MODE register

If lp5521_read fails, engine_state variable is not initialized.
If lp5521_read fails, we should return error.
This patch fixes below warning.

CC drivers/leds/leds-lp5521.o
drivers/leds/leds-lp5521.c: In function 'lp5521_set_engine_mode':
drivers/leds/leds-lp5521.c:168: warning: 'engine_state' may be used uninitialized in this function

[akpm@linux-foundation.org: remove unneeded "ret |="]
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Samu Onkalo <samu.p.onkalo@nokia.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>