Skip to content

Commit d91f6ce

Browse files
Wei Yongjuncomputersforpeace
authored andcommitted
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 <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Brian Norris <[email protected]>
1 parent 2bfc745 commit d91f6ce

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/mtd/spi-nor/aspeed-smc.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -723,17 +723,13 @@ static int aspeed_smc_probe(struct platform_device *pdev)
723723

724724
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
725725
controller->regs = devm_ioremap_resource(dev, res);
726-
if (IS_ERR(controller->regs)) {
727-
dev_err(dev, "Cannot remap controller address.\n");
726+
if (IS_ERR(controller->regs))
728727
return PTR_ERR(controller->regs);
729-
}
730728

731729
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
732730
controller->ahb_base = devm_ioremap_resource(dev, res);
733-
if (IS_ERR(controller->ahb_base)) {
734-
dev_err(dev, "Cannot remap controller address.\n");
731+
if (IS_ERR(controller->ahb_base))
735732
return PTR_ERR(controller->ahb_base);
736-
}
737733

738734
ret = aspeed_smc_setup_flash(controller, np, res);
739735
if (ret)

0 commit comments

Comments
 (0)