pwm: pwm-bfin: Return proper error if pwmchip_remove() fails
authorAxel Lin <axel.lin@gmail.com>
Sun, 1 Jul 2012 04:57:00 +0000 (12:57 +0800)
committerThierry Reding <thierry.reding@avionic-design.de>
Mon, 23 Jul 2012 11:24:00 +0000 (13:24 +0200)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
drivers/pwm/pwm-bfin.c

index a0c6bf9070eaa0812d70d2010c42250e345200eb..d53c4e7941ef4364f9cf06975e19132e86bf817a 100644 (file)
@@ -146,9 +146,7 @@ static int __devexit bfin_pwm_remove(struct platform_device *pdev)
 {
        struct bfin_pwm_chip *pwm = platform_get_drvdata(pdev);
 
-       pwmchip_remove(&pwm->chip);
-
-       return 0;
+       return pwmchip_remove(&pwm->chip);
 }
 
 static struct platform_driver bfin_pwm_driver = {