Skip to content
Commit 1b21ec5a authored by Jingoo Han's avatar Jingoo Han Committed by Bryan Wu
Browse files

leds: leds-lp5523: fix build warnings



This patch fixes build warnings as below:

drivers/leds/leds-lp5523.c: In function 'lp5523_selftest':
drivers/leds/leds-lp5523.c:496:18: warning: 'adc' may be used uninitialized in this function [-Wuninitialized]
drivers/leds/leds-lp5523.c:471:5: warning: 'vdd' may be used uninitialized in this function [-Wuninitialized]
drivers/leds/leds-lp5523.c: In function 'lp5523_probe':
drivers/leds/leds-lp5523.c:252:9: warning: 'status' may be used uninitialized in this function [-Wuninitialized]
drivers/leds/leds-lp5523.c:201:5: note: 'status' was declared here

If lp5523_read() returns an error, problems will happen. Thus,
when lp5523_read() returns an error, it should be handled.

Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarBryan Wu <cooloney@gmail.com>
parent 04553e92
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment