Commit 4dea5806d332f91d640d99943db99a5539e832c3
Committed by
Rafael J. Wysocki
1 parent
e4a6a29d12
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
cpufreq: return EEXIST instead of EBUSY for second registering
On systems that support intel_pstate, acpi_cpufreq fails to load, and udev keeps trying until trace gets filled up and kernel crashes. The root cause is driver return ret from cpufreq_register_driver(), because when some other driver takes over before, it will return EBUSY and then udev will keep trying ... cpufreq_register_driver() should return EEXIST instead so that the system can boot without appending intel_pstate=disable and still use intel_pstate. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
drivers/cpufreq/cpufreq.c
... | ... | @@ -2104,7 +2104,7 @@ |
2104 | 2104 | write_lock_irqsave(&cpufreq_driver_lock, flags); |
2105 | 2105 | if (cpufreq_driver) { |
2106 | 2106 | write_unlock_irqrestore(&cpufreq_driver_lock, flags); |
2107 | - return -EBUSY; | |
2107 | + return -EEXIST; | |
2108 | 2108 | } |
2109 | 2109 | cpufreq_driver = driver_data; |
2110 | 2110 | write_unlock_irqrestore(&cpufreq_driver_lock, flags); |