summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/raw/cadence-nand-controller.c
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-10-23 16:57:10 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2019-10-29 16:42:12 +0300
commit29d9640bb537bbe0c37ffd672ff56b73e4aa3252 (patch)
treec4a5b3e81989142ed10599f3c0e9aed73142ec3d /drivers/mtd/nand/raw/cadence-nand-controller.c
parent21777bc90427dd396e17377f2eed46fcc9c9989e (diff)
downloadlinux-29d9640bb537bbe0c37ffd672ff56b73e4aa3252.tar.xz
mtd: rawnand: cadence: Remove dev_err() on platform_get_irq() failure
platform_get_irq() will call dev_err() itself on failure, so there is no need for the driver to also do this. This is detected by coccinelle. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/cadence-nand-controller.c')
-rw-r--r--drivers/mtd/nand/raw/cadence-nand-controller.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c
index 91dabff4b09d..28a0426cb16e 100644
--- a/drivers/mtd/nand/raw/cadence-nand-controller.c
+++ b/drivers/mtd/nand/raw/cadence-nand-controller.c
@@ -2961,10 +2961,9 @@ static int cadence_nand_dt_probe(struct platform_device *ofdev)
cdns_ctrl->dev = &ofdev->dev;
cdns_ctrl->irq = platform_get_irq(ofdev, 0);
- if (cdns_ctrl->irq < 0) {
- dev_err(&ofdev->dev, "no irq defined\n");
+ if (cdns_ctrl->irq < 0)
return cdns_ctrl->irq;
- }
+
dev_info(cdns_ctrl->dev, "IRQ: nr %d\n", cdns_ctrl->irq);
cdns_ctrl->reg = devm_platform_ioremap_resource(ofdev, 0);