cpufreq: pcc-cpufreq: Fail initialization if driver cannot be registered
Make pcc_cpufreq_init() return error codes when the driver cannot be registered. Otherwise the driver can shows up loaded via lsmod even though it failed initialization. This is confusing to the user. Signed-off-by: David Arcari <darcari@redhat.com> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
9e0babf2c0
commit
2d4a79ae34
|
@ -582,10 +582,10 @@ static int __init pcc_cpufreq_init(void)
|
|||
|
||||
/* Skip initialization if another cpufreq driver is there. */
|
||||
if (cpufreq_get_current_driver())
|
||||
return 0;
|
||||
return -EEXIST;
|
||||
|
||||
if (acpi_disabled)
|
||||
return 0;
|
||||
return -ENODEV;
|
||||
|
||||
ret = pcc_cpufreq_probe();
|
||||
if (ret) {
|
||||
|
|
Loading…
Reference in New Issue