In commit
4f304245b "mfd: Set asic3 DS1WM clock_rate", a possible
path through asic3_mfd_probe was introduced that would lead to
an unpredictable return value, if everything succeeds but there
are pdata->leds is NULL. This was reported correctly by gcc.
Without this patch, building magician_defconfig results in:
drivers/mfd/asic3.c: In function 'asic3_mfd_probe':
drivers/mfd/asic3.c:940:2: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]
Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Paul Parsons <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Samuel Ortiz <[email protected]>
goto out;
}
+ ret = 0;
if (pdata->leds) {
int i;