From 2d5928fef23d5035c75f2ad49f25b83c2e8b304b Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Tue, 30 Jul 2019 11:15:51 -0700 Subject: [PATCH] net: 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. // @@ 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(...); ) ... } // While we're here, remove braces on if statements that only have one statement (manually). Cc: "David S. Miller" Cc: Kalle Valo Cc: Saeed Mahameed Cc: Jeff Kirsher Cc: Felix Fietkau Cc: Lorenzo Bianconi Cc: netdev@vger.kernel.org Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: David S. Miller --- mt7603/soc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mt7603/soc.c b/mt7603/soc.c index b7138485..cecc1fd3 100644 --- a/mt7603/soc.c +++ b/mt7603/soc.c @@ -17,10 +17,8 @@ mt76_wmac_probe(struct platform_device *pdev) int ret; irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(&pdev->dev, "Failed to get device IRQ\n"); + if (irq < 0) return irq; - } mem_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(mem_base)) {