diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2012-07-02 23:32:33 +0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@avionic-design.de> | 2012-07-23 15:23:59 +0400 |
commit | abeaf75527386adea831914579f0b8711287d3f8 (patch) | |
tree | 799677b82c6b7e811f8edc099382011f499dbce3 | |
parent | 45b301d2b188af6db332cbb14c36e20b5204223e (diff) | |
download | linux-abeaf75527386adea831914579f0b8711287d3f8.tar.xz |
pwm: pxa: Propagate pwmchip_remove() error
If the pwmchip_remove() call fails, propagate the error to the driver's
remove callback. This is required to prevent the module from being
unloaded if a PWM provided by the driver is still in use.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
-rw-r--r-- | drivers/pwm/pwm-pxa.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c index a2be966d550d..bd5867a1c700 100644 --- a/drivers/pwm/pwm-pxa.c +++ b/drivers/pwm/pwm-pxa.c @@ -190,8 +190,7 @@ static int __devexit pwm_remove(struct platform_device *pdev) if (chip == NULL) return -ENODEV; - pwmchip_remove(&chip->chip); - return 0; + return pwmchip_remove(&chip->chip); } static struct platform_driver pwm_driver = { |