diff options
author | Stephen Boyd <swboyd@chromium.org> | 2019-07-30 11:15:33 -0700 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-08-05 13:24:06 +0200 |
commit | 64c4dcbfcc4ea3ae8f898e6dac836e57acb16b6b (patch) | |
tree | 8ffc47e61b8bd7e22a1d70507573b345a8d954a7 /drivers/pinctrl/pinctrl-stmfx.c | |
parent | 31b4c4b12435911bad5960e88e0675713ae404fb (diff) | |
download | linux-64c4dcbfcc4ea3ae8f898e6dac836e57acb16b6b.tar.bz2 |
pinctrl: 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: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20190730181557.90391-34-swboyd@chromium.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-stmfx.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-stmfx.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c index 31b6e511670f..d7e37b51984f 100644 --- a/drivers/pinctrl/pinctrl-stmfx.c +++ b/drivers/pinctrl/pinctrl-stmfx.c @@ -608,10 +608,8 @@ static int stmfx_pinctrl_probe(struct platform_device *pdev) } irq = platform_get_irq(pdev, 0); - if (irq <= 0) { - dev_err(pctl->dev, "failed to get irq\n"); + if (irq <= 0) return -ENXIO; - } mutex_init(&pctl->lock); |