Skip to content

Commit cf3b1c2

Browse files
shcgitcooloney
authored andcommitted
leds: mc13783: Fix "uninitialized variable" warning
drivers/leds/leds-mc13783.c: In function 'mc13xxx_led_probe': drivers/leds/leds-mc13783.c:195:2: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Bryan Wu <[email protected]>
1 parent 73e1ab4 commit cf3b1c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/leds/leds-mc13783.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static int __init mc13xxx_led_probe(struct platform_device *pdev)
208208
struct mc13xxx_led_devtype *devtype =
209209
(struct mc13xxx_led_devtype *)pdev->id_entry->driver_data;
210210
struct mc13xxx_leds *leds;
211-
int i, id, num_leds, ret;
211+
int i, id, num_leds, ret = -ENODATA;
212212
u32 reg, init_led = 0;
213213

214214
if (!pdata) {

0 commit comments

Comments
 (0)