diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index e28f6ea46f1a0c..7f15b8514a1899 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -368,7 +368,7 @@ EXPORT_SYMBOL_GPL(cpuidle_enable_device); */ void cpuidle_disable_device(struct cpuidle_device *dev) { - if (!dev->enabled) + if (!dev || !dev->enabled) return; if (!cpuidle_get_driver() || !cpuidle_curr_governor) return;