OSDN Git Service

mfd: Fix mismatch in twl4030 mutex lock-unlock
authorSanjeev Premi <premi@ti.com>
Mon, 11 Jul 2011 15:20:31 +0000 (20:50 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Jan 2012 22:14:10 +0000 (14:14 -0800)
commit4838b7e04451e425895c77f462ae1a70d6d3ff62
tree04b3fbb7a5826923e4e935ab888afbde6b570796
parent244e209cbfb8fef744f47f4a9fe0b8c036772d8f
mfd: Fix mismatch in twl4030 mutex lock-unlock

commit e178ccb33569da17dc897a08a3865441b813bdfb upstream.

A mutex is locked on entry into twl4030_madc_conversion().
Immediate return on some error conditions leaves the
mutex locked.

This patch ensures that mutex is always unlocked before
leaving the function.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Cc: Keerthy <j-keerthy@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/mfd/twl4030-madc.c