Răsfoiți Sursa

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>
Thierry Reding 13 ani în urmă
părinte
comite
abeaf75527
1 a modificat fișierele cu 1 adăugiri și 2 ștergeri
  1. 1 2
      drivers/pwm/pwm-pxa.c

+ 1 - 2
drivers/pwm/pwm-pxa.c

@@ -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 0;
+	return pwmchip_remove(&chip->chip);
 }
 }
 
 
 static struct platform_driver pwm_driver = {
 static struct platform_driver pwm_driver = {