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 <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Philip, Avinash <[email protected]>
---
 drivers/pwm/pwm-tegra.c    |    4 +---
 drivers/pwm/pwm-tiecap.c   |    4 +---
 drivers/pwm/pwm-tiehrpwm.c |    4 +---
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/pwm/pwm-tegra.c b/drivers/pwm/pwm-tegra.c
index 02ce18d..057465e 100644
--- a/drivers/pwm/pwm-tegra.c
+++ b/drivers/pwm/pwm-tegra.c
@@ -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);
 
diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c
index 3c2ad28..0b66d0f 100644
--- a/drivers/pwm/pwm-tiecap.c
+++ b/drivers/pwm/pwm-tiecap.c
@@ -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) {
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index 010d232..c3756d1 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -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) {
-- 
1.7.9.5



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to