Commit abeaf755 authored by Thierry Reding's avatar Thierry Reding

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: default avatarThierry Reding <thierry.reding@avionic-design.de>
parent 45b301d2
...@@ -190,8 +190,7 @@ static int __devexit pwm_remove(struct platform_device *pdev) ...@@ -190,8 +190,7 @@ static int __devexit pwm_remove(struct platform_device *pdev)
if (chip == NULL) if (chip == NULL)
return -ENODEV; return -ENODEV;
pwmchip_remove(&chip->chip); return pwmchip_remove(&chip->chip);
return 0;
} }
static struct platform_driver pwm_driver = { static struct platform_driver pwm_driver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment