Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <shc_work@mail.ru>
Signed-off-by: Bryan Wu <cooloney@gmail.com>

authored by

Alexander Shiyan and committed by
Bryan Wu
cf3b1c2b 73e1ab41

+1 -1
+1 -1
drivers/leds/leds-mc13783.c
··· 208 208 struct mc13xxx_led_devtype *devtype = 209 209 (struct mc13xxx_led_devtype *)pdev->id_entry->driver_data; 210 210 struct mc13xxx_leds *leds; 211 - int i, id, num_leds, ret; 211 + int i, id, num_leds, ret = -ENODATA; 212 212 u32 reg, init_led = 0; 213 213 214 214 if (!pdata) {