Message ID | 20170813035040.GA13637@leoy-linaro (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
diff --git a/drivers/cpuidle/cpuidle-arm.c b/drivers/cpuidle/cpuidle-arm.c index 7080c38..80dc86f 100644 --- a/drivers/cpuidle/cpuidle-arm.c +++ b/drivers/cpuidle/cpuidle-arm.c @@ -152,11 +152,13 @@ static int __init arm_idle_init(void) out_fail: while (--cpu >= 0) { dev = per_cpu(cpuidle_devices, cpu); - cpuidle_unregister_device(dev); - kfree(dev); - drv = cpuidle_get_driver(); + drv = cpuidle_get_cpu_driver(dev); + cpuidle_unregister_driver(drv); kfree(drv); + + cpuidle_unregister_device(dev); + kfree(dev); } return ret;