leds: mc13783: Fix "uninitialized variable" warning
authorAlexander Shiyan <shc_work@mail.ru>
Tue, 2 Jul 2013 15:17:17 +0000 (08:17 -0700)
committerBryan Wu <cooloney@gmail.com>
Tue, 2 Jul 2013 15:44:02 +0000 (08:44 -0700)
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 <shc_work@mail.ru>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
drivers/leds/leds-mc13783.c

index f4de98052aaac34a9a0f2c84ce10e0d2100031a2..fa9b439323bd06d0d126a48a7828e4b47665c6b5 100644 (file)
@@ -208,7 +208,7 @@ static int __init mc13xxx_led_probe(struct platform_device *pdev)
        struct mc13xxx_led_devtype *devtype =
                (struct mc13xxx_led_devtype *)pdev->id_entry->driver_data;
        struct mc13xxx_leds *leds;
-       int i, id, num_leds, ret;
+       int i, id, num_leds, ret = -ENODATA;
        u32 reg, init_led = 0;
 
        if (!pdata) {