From: Thierry Reding Date: Mon, 2 Jul 2012 19:32:33 +0000 (+0200) Subject: pwm: pxa: Propagate pwmchip_remove() error X-Git-Tag: v5.15~21940^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=abeaf75527386adea831914579f0b8711287d3f8;p=platform%2Fkernel%2Flinux-starfive.git 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 --- diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c index a2be966..bd5867a 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 = {