Skip to content

Commit

Permalink
mtd: rawnand: cadence: remove a redundant dev_err call
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Liu Shixin authored and Miquel Raynal committed Sep 30, 2020
1 parent 6d11178 commit fb1c7e8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/mtd/nand/raw/cadence-nand-controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -2980,18 +2980,14 @@ static int cadence_nand_dt_probe(struct platform_device *ofdev)
dev_info(cdns_ctrl->dev, "IRQ: nr %d\n", cdns_ctrl->irq);

cdns_ctrl->reg = devm_platform_ioremap_resource(ofdev, 0);
if (IS_ERR(cdns_ctrl->reg)) {
dev_err(&ofdev->dev, "devm_ioremap_resource res 0 failed\n");
if (IS_ERR(cdns_ctrl->reg))
return PTR_ERR(cdns_ctrl->reg);
}

res = platform_get_resource(ofdev, IORESOURCE_MEM, 1);
cdns_ctrl->io.dma = res->start;
cdns_ctrl->io.virt = devm_ioremap_resource(&ofdev->dev, res);
if (IS_ERR(cdns_ctrl->io.virt)) {
dev_err(cdns_ctrl->dev, "devm_ioremap_resource res 1 failed\n");
if (IS_ERR(cdns_ctrl->io.virt))
return PTR_ERR(cdns_ctrl->io.virt);
}

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

0 comments on commit fb1c7e8

Please sign in to comment.