mtd: aspeed: remove redundant dev_err call in aspeed_smc_probe()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sun Feb 12 18:59:14 PST 2017


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=d91f6cee98b6e0ef5a05209ca9b741d23086cdb2
Commit:     d91f6cee98b6e0ef5a05209ca9b741d23086cdb2
Parent:     2bfc7452742617fe1182b742917e6e9032eae52c
Author:     Wei Yongjun <weiyongjun1 at huawei.com>
AuthorDate: Wed Feb 8 16:23:10 2017 +0000
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Fri Feb 10 11:20:22 2017 -0800

    mtd: aspeed: remove redundant dev_err call in aspeed_smc_probe()
    
    There is a error message within devm_ioremap_resource
    already, so remove the dev_err call to avoid redundant
    error message.
    
    Signed-off-by: Wei Yongjun <weiyongjun1 at huawei.com>
    Reviewed-by: Marek Vasut <marek.vasut at gmail.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/spi-nor/aspeed-smc.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/mtd/spi-nor/aspeed-smc.c b/drivers/mtd/spi-nor/aspeed-smc.c
index 7c86099..56051d3 100644
--- a/drivers/mtd/spi-nor/aspeed-smc.c
+++ b/drivers/mtd/spi-nor/aspeed-smc.c
@@ -723,17 +723,13 @@ static int aspeed_smc_probe(struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	controller->regs = devm_ioremap_resource(dev, res);
-	if (IS_ERR(controller->regs)) {
-		dev_err(dev, "Cannot remap controller address.\n");
+	if (IS_ERR(controller->regs))
 		return PTR_ERR(controller->regs);
-	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
 	controller->ahb_base = devm_ioremap_resource(dev, res);
-	if (IS_ERR(controller->ahb_base)) {
-		dev_err(dev, "Cannot remap controller address.\n");
+	if (IS_ERR(controller->ahb_base))
 		return PTR_ERR(controller->ahb_base);
-	}
 
 	ret = aspeed_smc_setup_flash(controller, np, res);
 	if (ret)



More information about the linux-mtd-cvs mailing list