summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-10-23 15:57:10 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2019-10-29 14:42:12 +0100
commit29d9640bb537bbe0c37ffd672ff56b73e4aa3252 (patch)
treec4a5b3e81989142ed10599f3c0e9aed73142ec3d /drivers/mtd
parentmtd: rawnand: mxic: Remove dev_err() on platform_get_irq() failure (diff)
downloadlinux-29d9640bb537bbe0c37ffd672ff56b73e4aa3252.tar.xz
linux-29d9640bb537bbe0c37ffd672ff56b73e4aa3252.zip
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')
-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);