diff options
author | Arnd Bergmann <arnd@arndb.de> | 2014-09-26 16:19:12 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-09-29 09:36:03 -0400 |
commit | d62dbf77f7dfaa6fb455b4b9828069a11965929c (patch) | |
tree | 2c4f1c60f6ff7a1cea0be9d7b6f3b75aff576361 /drivers/cpufreq/integrator-cpufreq.c | |
parent | e65b5ddba84634f31d42dfd86013f4c6be5e9e32 (diff) |
cpufreq: integrator: fix integrator_cpufreq_remove return type
When building this driver as a module, we get a helpful warning
about the return type:
drivers/cpufreq/integrator-cpufreq.c:232:2: warning: initialization from incompatible pointer type
.remove = __exit_p(integrator_cpufreq_remove),
If the remove callback returns void, the caller gets an undefined
value as it expects an integer to be returned. This fixes the
problem by passing down the value from cpufreq_unregister_driver.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/integrator-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/integrator-cpufreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpufreq/integrator-cpufreq.c b/drivers/cpufreq/integrator-cpufreq.c index c1320528b9d0..6bd69adc3c5e 100644 --- a/drivers/cpufreq/integrator-cpufreq.c +++ b/drivers/cpufreq/integrator-cpufreq.c | |||
@@ -213,9 +213,9 @@ static int __init integrator_cpufreq_probe(struct platform_device *pdev) | |||
213 | return cpufreq_register_driver(&integrator_driver); | 213 | return cpufreq_register_driver(&integrator_driver); |
214 | } | 214 | } |
215 | 215 | ||
216 | static void __exit integrator_cpufreq_remove(struct platform_device *pdev) | 216 | static int __exit integrator_cpufreq_remove(struct platform_device *pdev) |
217 | { | 217 | { |
218 | cpufreq_unregister_driver(&integrator_driver); | 218 | return cpufreq_unregister_driver(&integrator_driver); |
219 | } | 219 | } |
220 | 220 | ||
221 | static const struct of_device_id integrator_cpufreq_match[] = { | 221 | static const struct of_device_id integrator_cpufreq_match[] = { |