summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
diff options
context:
space:
mode:
authorStephen Boyd <swboyd@chromium.org>2019-07-30 20:15:33 +0200
committerLinus Walleij <linus.walleij@linaro.org>2019-08-05 13:24:06 +0200
commit64c4dcbfcc4ea3ae8f898e6dac836e57acb16b6b (patch)
tree8ffc47e61b8bd7e22a1d70507573b345a8d954a7 /drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
parentpinctrl: uniphier: Fix Pro5 SD pin-mux setting (diff)
downloadlinux-64c4dcbfcc4ea3ae8f898e6dac836e57acb16b6b.tar.xz
linux-64c4dcbfcc4ea3ae8f898e6dac836e57acb16b6b.zip
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/qcom/pinctrl-ssbi-mpp.c')
-rw-r--r--drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
index 076ba085a6a1..3d8b1d74fa2f 100644
--- a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
+++ b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
@@ -791,11 +791,8 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
for (i = 0; i < pctrl->desc.npins; i++) {
pin_data[i].reg = SSBI_REG_ADDR_MPP(i);
pin_data[i].irq = platform_get_irq(pdev, i);
- if (pin_data[i].irq < 0) {
- dev_err(&pdev->dev,
- "missing interrupts for pin %d\n", i);
+ if (pin_data[i].irq < 0)
return pin_data[i].irq;
- }
ret = pm8xxx_pin_populate(pctrl, &pin_data[i]);
if (ret)