acpi-cpufreq: Fail initialization if driver cannot be registered
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 25 Oct 2013 14:22:47 +0000 (16:22 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 25 Oct 2013 14:22:47 +0000 (16:22 +0200)
commit75c0758137c7ac647927b4b12bb5cfca96a0e4e6
tree9f40f1e9668e37d853e2ce29c930c39927b03607
parentd3c345dbc7c083414ef74eb22ff26ba2bd100759
acpi-cpufreq: Fail initialization if driver cannot be registered

Make acpi_cpufreq_init() return error codes when the driver cannot be
registered so that the module doesn't stay useless in memory and so
that acpi_cpufreq_exit() doesn't attempt to unregister things that
have never been registered when the module is unloaded.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/acpi-cpufreq.c