summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2021-04-08 13:15:12 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2021-05-10 10:34:41 +0200
commite101bd30456111d46bf4c54df122314ce96e4180 (patch)
tree37982b45a96cec95d55d0286fd316885ce1b4848
parentmtd: rawnand: hisi504: Remove redundant dev_err call in probe (diff)
downloadlinux-e101bd30456111d46bf4c54df122314ce96e4180.tar.xz
linux-e101bd30456111d46bf4c54df122314ce96e4180.zip
mtd: rawnand: mtk: remove redundant dev_err call in mtk_ecc_probe()
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210408111514.1011020-2-yukuai3@huawei.com
-rw-r--r--drivers/mtd/nand/raw/mtk_ecc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/nand/raw/mtk_ecc.c b/drivers/mtd/nand/raw/mtk_ecc.c
index 75f1fa3d4d35..c437d97debb8 100644
--- a/drivers/mtd/nand/raw/mtk_ecc.c
+++ b/drivers/mtd/nand/raw/mtk_ecc.c
@@ -515,10 +515,8 @@ static int mtk_ecc_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
ecc->regs = devm_ioremap_resource(dev, res);
- if (IS_ERR(ecc->regs)) {
- dev_err(dev, "failed to map regs: %ld\n", PTR_ERR(ecc->regs));
+ if (IS_ERR(ecc->regs))
return PTR_ERR(ecc->regs);
- }
ecc->clk = devm_clk_get(dev, NULL);
if (IS_ERR(ecc->clk)) {