pwm: Remove a redundant error message when devm_request_and_ioremap fails
authorAxel Lin <axel.lin@gmail.com>
Fri, 3 Aug 2012 13:43:54 +0000 (21:43 +0800)
committerThierry Reding <thierry.reding@avionic-design.de>
Fri, 17 Aug 2012 12:08:25 +0000 (14:08 +0200)
The implementation in devm_request_and_ioremap() already shows error message,
so no need to show dev_err again if devm_request_and_ioremap() fails.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Philip, Avinash <avinashphilip@ti.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
drivers/pwm/pwm-tegra.c
drivers/pwm/pwm-tiecap.c
drivers/pwm/pwm-tiehrpwm.c

index 02ce18d5e49a7800e396d2e519692bc1937701bf..057465e0553c7d252b8be7eebf5507deb5a24127 100644 (file)
@@ -187,10 +187,8 @@ static int tegra_pwm_probe(struct platform_device *pdev)
        }
 
        pwm->mmio_base = devm_request_and_ioremap(&pdev->dev, r);
-       if (!pwm->mmio_base) {
-               dev_err(&pdev->dev, "failed to ioremap() region\n");
+       if (!pwm->mmio_base)
                return -EADDRNOTAVAIL;
-       }
 
        platform_set_drvdata(pdev, pwm);
 
index 3c2ad284ee3ecce9a2ee80a140cdd2351b494530..0b66d0f259224f9e7ca679a2759a473708cd3be6 100644 (file)
@@ -192,10 +192,8 @@ static int __devinit ecap_pwm_probe(struct platform_device *pdev)
        }
 
        pc->mmio_base = devm_request_and_ioremap(&pdev->dev, r);
-       if (!pc->mmio_base) {
-               dev_err(&pdev->dev, "failed to ioremap() registers\n");
+       if (!pc->mmio_base)
                return -EADDRNOTAVAIL;
-       }
 
        ret = pwmchip_add(&pc->chip);
        if (ret < 0) {
index 010d232cb0c8b3ab2f586f93aebae056a4d7daf1..c3756d1be19496fdf3dd163787b7e289e9ad70bd 100644 (file)
@@ -371,10 +371,8 @@ static int __devinit ehrpwm_pwm_probe(struct platform_device *pdev)
        }
 
        pc->mmio_base = devm_request_and_ioremap(&pdev->dev, r);
-       if (!pc->mmio_base) {
-               dev_err(&pdev->dev, "failed to ioremap() registers\n");
+       if (!pc->mmio_base)
                return  -EADDRNOTAVAIL;
-       }
 
        ret = pwmchip_add(&pc->chip);
        if (ret < 0) {