Skip to content

Commit

Permalink
cpufreq: integrator: fix integrator_cpufreq_remove return type
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnd Bergmann authored and Rafael J. Wysocki committed Sep 29, 2014
1 parent e65b5dd commit d62dbf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/cpufreq/integrator-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ static int __init integrator_cpufreq_probe(struct platform_device *pdev)
return cpufreq_register_driver(&integrator_driver);
}

static void __exit integrator_cpufreq_remove(struct platform_device *pdev)
static int __exit integrator_cpufreq_remove(struct platform_device *pdev)
{
cpufreq_unregister_driver(&integrator_driver);
return cpufreq_unregister_driver(&integrator_driver);
}

static const struct of_device_id integrator_cpufreq_match[] = {
Expand Down

0 comments on commit d62dbf7

Please sign in to comment.