From: Stephen Boyd Date: Tue, 30 Jul 2019 18:15:34 +0000 (-0700) Subject: pinctrl: cherryview: Remove dev_err() usage after platform_get_irq() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=57afe3ea27141720cf8c4e061ba8cec2f9c60d0c;p=linux.git pinctrl: cherryview: 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: Linus Walleij Cc: linux-gpio@vger.kernel.org Cc: Greg Kroah-Hartman Cc: Mika Westerberg Cc: Andy Shevchenko Signed-off-by: Stephen Boyd Signed-off-by: Andy Shevchenko --- diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c index dbbd9898ad2fc..cfb7168fe7668 100644 --- a/drivers/pinctrl/intel/pinctrl-cherryview.c +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c @@ -1701,10 +1701,8 @@ static int chv_pinctrl_probe(struct platform_device *pdev) return PTR_ERR(pctrl->regs); irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(&pdev->dev, "failed to get interrupt number\n"); + if (irq < 0) return irq; - } pctrl->pctldesc = chv_pinctrl_desc; pctrl->pctldesc.name = dev_name(&pdev->dev);