linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] mtd: rawnand: mxic: Remove dev_err() on platform_get_irq() failure
@ 2019-10-24  2:29 YueHaibing
  2019-10-30  8:24 ` Miquel Raynal
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-10-24  2:29 UTC (permalink / raw)
  To: miquel.raynal, richard, dwmw2, computersforpeace, vigneshr,
	masonccyang, yuehaibing
  Cc: linux-mtd, linux-kernel

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>
---
 drivers/mtd/nand/raw/mxic_nand.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/raw/mxic_nand.c b/drivers/mtd/nand/raw/mxic_nand.c
index 9d49e6c..ed7a4e0 100644
--- a/drivers/mtd/nand/raw/mxic_nand.c
+++ b/drivers/mtd/nand/raw/mxic_nand.c
@@ -524,10 +524,8 @@ static int mxic_nfc_probe(struct platform_device *pdev)
 	nand_chip->controller = &nfc->controller;
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(&pdev->dev, "failed to retrieve irq\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	mxic_nfc_hw_init(nfc);
 
-- 
2.7.4



______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] mtd: rawnand: mxic: Remove dev_err() on platform_get_irq() failure
  2019-10-24  2:29 [PATCH -next] mtd: rawnand: mxic: Remove dev_err() on platform_get_irq() failure YueHaibing
@ 2019-10-30  8:24 ` Miquel Raynal
  0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2019-10-30  8:24 UTC (permalink / raw)
  To: YueHaibing, miquel.raynal, richard, dwmw2, computersforpeace,
	vigneshr, masonccyang
  Cc: linux-mtd, linux-kernel

On Thu, 2019-10-24 at 02:29:34 UTC, YueHaibing wrote:
> 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>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-30  8:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-24  2:29 [PATCH -next] mtd: rawnand: mxic: Remove dev_err() on platform_get_irq() failure YueHaibing
2019-10-30  8:24 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).