]> git.karo-electronics.de Git - karo-tx-linux.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)
commitb2f0fa828ee7265028f1bca87928b0dc69663b53
tree29632369130a3a622bd85447234a4ea163d008a2
parent0d7614f09c1ebdbaa1599a5aba7593f147bf96ee
mfd/asic3: fix asic3_mfd_probe return value

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 <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