From: Frans Klaver Date: Wed, 14 Jan 2015 08:15:43 +0000 (+0100) Subject: power: reset: ltc2952: disable timers in _remove X-Git-Tag: firefly_0821_release~176^2~2370^2~37 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2f6ea8ad738e7a9be1a675a4404606723797cc16;p=firefly-linux-kernel-4.4.55.git power: reset: ltc2952: disable timers in _remove Disable the timers when ltc2952_poweroff is removed. We don't want to risk calling functions on data that no longer exist. Signed-off-by: Frans Klaver Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/reset/ltc2952-poweroff.c b/drivers/power/reset/ltc2952-poweroff.c index 8e04b3299f9a..240b294a0980 100644 --- a/drivers/power/reset/ltc2952-poweroff.c +++ b/drivers/power/reset/ltc2952-poweroff.c @@ -285,6 +285,8 @@ static int ltc2952_poweroff_remove(struct platform_device *pdev) struct ltc2952_poweroff *data = platform_get_drvdata(pdev); pm_power_off = NULL; + hrtimer_cancel(&data->timer_trigger); + hrtimer_cancel(&data->timer_wde); atomic_notifier_chain_unregister(&panic_notifier_list, &data->panic_notifier); return 0;