Skip to content

Commit fb1c7e8

Browse files
Liu Shixinmiquelraynal
authored andcommitted
mtd: rawnand: cadence: remove a redundant dev_err call
There is an error message within devm_ioremap_resource already, so remove the dev_err call to avoid a redundant error message. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20200921013805.1724606-1-liushixin2@huawei.com
1 parent 6d11178 commit fb1c7e8

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

drivers/mtd/nand/raw/cadence-nand-controller.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2980,18 +2980,14 @@ static int cadence_nand_dt_probe(struct platform_device *ofdev)
29802980
dev_info(cdns_ctrl->dev, "IRQ: nr %d\n", cdns_ctrl->irq);
29812981

29822982
cdns_ctrl->reg = devm_platform_ioremap_resource(ofdev, 0);
2983-
if (IS_ERR(cdns_ctrl->reg)) {
2984-
dev_err(&ofdev->dev, "devm_ioremap_resource res 0 failed\n");
2983+
if (IS_ERR(cdns_ctrl->reg))
29852984
return PTR_ERR(cdns_ctrl->reg);
2986-
}
29872985

29882986
res = platform_get_resource(ofdev, IORESOURCE_MEM, 1);
29892987
cdns_ctrl->io.dma = res->start;
29902988
cdns_ctrl->io.virt = devm_ioremap_resource(&ofdev->dev, res);
2991-
if (IS_ERR(cdns_ctrl->io.virt)) {
2992-
dev_err(cdns_ctrl->dev, "devm_ioremap_resource res 1 failed\n");
2989+
if (IS_ERR(cdns_ctrl->io.virt))
29932990
return PTR_ERR(cdns_ctrl->io.virt);
2994-
}
29952991

29962992
dt->clk = devm_clk_get(cdns_ctrl->dev, "nf_clk");
29972993
if (IS_ERR(dt->clk))

0 commit comments

Comments
 (0)