cpufreq: cpufreq_register_driver() should return -ENODEV if init fails
authorDavid Arcari <darcari@redhat.com>
Fri, 26 May 2017 15:37:31 +0000 (11:37 -0400)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 02:55:47 +0000 (02:55 +0000)
commit58c0742f8925591790a71dd643b1beab14853a54
treea9003754174f898c782359a38876fc221312232e
parent1fbeb54f7dd6c9d4579a7f9fae0e949e48013302
cpufreq: cpufreq_register_driver() should return -ENODEV if init fails

commit 6c77003677d5f1ce15f26d24360cb66c0bc07bb3 upstream.

For a driver that does not set the CPUFREQ_STICKY flag, if all of the
->init() calls fail, cpufreq_register_driver() should return an error.
This will prevent the driver from loading.

Fixes: ce1bcfe94db8 (cpufreq: check cpufreq_policy_list instead of scanning policies for all CPUs)
Signed-off-by: David Arcari <darcari@redhat.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/cpufreq/cpufreq.c