mfd: Fix twl-core oops while calling twl_i2c_* for unbound driver
authorIlya Yanok <yanok@emcraft.com>
Mon, 1 Aug 2011 21:00:28 +0000 (23:00 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Jan 2012 22:17:12 +0000 (14:17 -0800)
commit5518e7a8f7964cb79760b2ca6736e8997a6e388b
treeba1e86229b0844e0a170b87dbb053ed8da1edaea
parent61bf2d48574d6ce5418b988e9547937c2efdd084
mfd: Fix twl-core oops while calling twl_i2c_* for unbound driver

commit 8653be1afd60d6e8c36139b487e375b70357d9ef upstream.

Check inuse variable before trying to access twl_map to prevent
dereferencing of uninitialized variable.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/mfd/twl-core.c