mfd: Fix twl-core oops while calling twl_i2c_* for unbound driver
commit20e725bc08091c303a469d8e1e295bf3b360c778
authorIlya Yanok <yanok@emcraft.com>
Mon, 1 Aug 2011 21:00:28 +0000 (1 23:00 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Jan 2012 22:13:53 +0000 (6 14:13 -0800)
tree00a6e8e96f7b91751414eef49b93c4f05ac65ad8
parentb05727c7f8e3b30309d013a7d3bbc6d1e6f860ba
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