@@ -1371,7 +1371,6 @@ static int omap_system_dma_probe(struct platform_device *pdev)
strcpy(irq_name, "0");
dma_irq = platform_get_irq_byname(pdev, irq_name);
if (dma_irq < 0) {
- dev_err(&pdev->dev, "failed: request IRQ %d", dma_irq);
ret = dma_irq;
goto exit_dma_lch_fail;
}
@@ -146,10 +146,9 @@ static int pxa_ssp_probe(struct platform_device *pdev)
}
ssp->irq = platform_get_irq(pdev, 0);
- if (ssp->irq < 0) {
- dev_err(dev, "no IRQ resource defined\n");
+ if (ssp->irq < 0)
return -ENODEV;
- }
+
if (dev->of_node) {
const struct of_device_id *id =
@@ -354,10 +354,8 @@ static int s3c_adc_probe(struct platform_device *pdev)
}
adc->irq = platform_get_irq(pdev, 1);
- if (adc->irq <= 0) {
- dev_err(dev, "failed to get adc irq\n");
+ if (adc->irq <= 0)
return -ENOENT;
- }
ret = devm_request_irq(dev, adc->irq, s3c_adc_irq, 0, dev_name(dev),
adc);
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: Russell King <linux@armlinux.org.uk> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Tony Lindgren <tony@atomide.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Simon Horman <horms+renesas@verge.net.au> Cc: Chen-Yu Tsai <wens@csie.org> Cc: linux-arm-kernel@lists.infradead.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> --- Please apply directly to subsystem trees arch/arm/plat-omap/dma.c | 1 - arch/arm/plat-pxa/ssp.c | 5 ++--- arch/arm/plat-samsung/adc.c | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-)