Skip to content

Commit

Permalink
mtd: aspeed: remove redundant dev_err call in aspeed_smc_probe()
Browse files Browse the repository at this point in the history
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@huawei.com>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
  • Loading branch information
Wei Yongjun authored and computersforpeace committed Feb 10, 2017
1 parent 2bfc745 commit d91f6ce
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/mtd/spi-nor/aspeed-smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d91f6ce

Please sign in to comment.