diff options
author | Stephen Boyd <swboyd@chromium.org> | 2019-07-30 11:15:30 -0700 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2019-10-08 19:01:49 +0200 |
commit | aab478ca0f7ada511088039c6e2c8fdcb09139db (patch) | |
tree | 5a8bbc0952c84a8142be33f9f82df941b4c6c6ad /drivers/mtd/nand/raw/mtk_ecc.c | |
parent | 0990fc56612b1303d4c1da7da91a93af3fd78717 (diff) | |
download | linux-aab478ca0f7ada511088039c6e2c8fdcb09139db.tar.gz linux-aab478ca0f7ada511088039c6e2c8fdcb09139db.tar.bz2 linux-aab478ca0f7ada511088039c6e2c8fdcb09139db.zip |
mtd: Remove dev_err() usage after platform_get_irq()
We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one
statement (manually).
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: linux-mtd@lists.infradead.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/mtk_ecc.c')
-rw-r--r-- | drivers/mtd/nand/raw/mtk_ecc.c | 4 |
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 74595b644b7c..75f1fa3d4d35 100644 --- a/drivers/mtd/nand/raw/mtk_ecc.c +++ b/drivers/mtd/nand/raw/mtk_ecc.c @@ -527,10 +527,8 @@ static int mtk_ecc_probe(struct platform_device *pdev) } irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(dev, "failed to get irq: %d\n", irq); + if (irq < 0) return irq; - } ret = dma_set_mask(dev, DMA_BIT_MASK(32)); if (ret) { |