Commit 2d4a79ae authored by David Arcari's avatar David Arcari Committed by Rafael J. Wysocki

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: default avatarDavid Arcari <darcari@redhat.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 9e0babf2
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment