diff options
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index f52facc570f5..3162010900c9 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -1015,6 +1015,10 @@ static int cpufreq_remove_dev (struct sys_device * sys_dev) | |||
1015 | { | 1015 | { |
1016 | unsigned int cpu = sys_dev->id; | 1016 | unsigned int cpu = sys_dev->id; |
1017 | int retval; | 1017 | int retval; |
1018 | |||
1019 | if (cpu_is_offline(cpu)) | ||
1020 | return 0; | ||
1021 | |||
1018 | if (unlikely(lock_policy_rwsem_write(cpu))) | 1022 | if (unlikely(lock_policy_rwsem_write(cpu))) |
1019 | BUG(); | 1023 | BUG(); |
1020 | 1024 | ||