Skip to content

Commit 3cfc43d

Browse files
vireshkLee Jones
authored andcommitted
mfd: wm8994-core: Disable regulators before removing them
The order in which resources were freed in wm8994_device_exit() isn't correct. The regulators are removed before they are disabled. Fix it by reordering code a bit, which makes it exact opposite of wm8994_device_init() as well. Signed-off-by: Viresh Kumar <[email protected]> Acked-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]>
1 parent d29ccdb commit 3cfc43d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mfd/wm8994-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,10 +604,10 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
604604
static void wm8994_device_exit(struct wm8994 *wm8994)
605605
{
606606
pm_runtime_disable(wm8994->dev);
607-
mfd_remove_devices(wm8994->dev);
608607
wm8994_irq_exit(wm8994);
609608
regulator_bulk_disable(wm8994->num_supplies,
610609
wm8994->supplies);
610+
mfd_remove_devices(wm8994->dev);
611611
}
612612

613613
static const struct of_device_id wm8994_of_match[] = {

0 commit comments

Comments
 (0)