regulator: fix use after free bug
authorLothar Waßmann <LW@KARO-electronics.de>
Mon, 28 Nov 2011 14:38:37 +0000 (15:38 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 28 Nov 2011 14:44:38 +0000 (14:44 +0000)
commit58fb5cf5d1edb7e306574833ee55d732918c89e3
tree56eeb31660956d2795ca068830c603d0d240c34b
parentd4d6373c1109b11c8118340be97ae31b8f94d66a
regulator: fix use after free bug

This is caused by dereferencing 'rdev' after device_unregister() in
the regulator_unregister() function.  'rdev' is freed by
device_unregister(), so it must not be dereferenced after this call.

[Edited commit message for legibility -- broonie]

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/core.c