]> git.baikalelectronics.ru Git - kernel.git/commit
mfd/asic3: fix asic3_mfd_probe return value
authorArnd Bergmann <arnd@arndb.de>
Sat, 4 Aug 2012 06:20:49 +0000 (06:20 +0000)
committerArnd Bergmann <arnd@arndb.de>
Wed, 8 Aug 2012 19:13:00 +0000 (21:13 +0200)
commita1ce68deb995ffe6afd526f4d00f67e9fd55bc8b
tree29632369130a3a622bd85447234a4ea163d008a2
parent9bab380dbc56a92c5472ee2154e0510c910a02c8
mfd/asic3: fix asic3_mfd_probe return value

In commit 975346b46 "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 <arnd@arndb.de>
Cc: Paul Parsons <lost.distance@yahoo.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/asic3.c