summaryrefslogtreecommitdiff
path: root/drivers/input/misc/e3x0-button.c
diff options
context:
space:
mode:
authorStephen Boyd <swboyd@chromium.org>2019-08-14 20:46:38 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2019-08-14 20:49:01 +0300
commit0bec8b7e5ca1a629f26173691526432f9d7cf8c1 (patch)
tree8b002ce844e53e1de228c0c581553473e948d86f /drivers/input/misc/e3x0-button.c
parentf5d4c647d0ddcf4ffcb9ff584fba87a976addcbd (diff)
downloadlinux-0bec8b7e5ca1a629f26173691526432f9d7cf8c1.tar.xz
Input: 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). Signed-off-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/misc/e3x0-button.c')
-rw-r--r--drivers/input/misc/e3x0-button.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/input/misc/e3x0-button.c b/drivers/input/misc/e3x0-button.c
index 4d7217f43888..e2fde6e1553f 100644
--- a/drivers/input/misc/e3x0-button.c
+++ b/drivers/input/misc/e3x0-button.c
@@ -65,18 +65,12 @@ static int e3x0_button_probe(struct platform_device *pdev)
int error;
irq_press = platform_get_irq_byname(pdev, "press");
- if (irq_press < 0) {
- dev_err(&pdev->dev, "No IRQ for 'press', error=%d\n",
- irq_press);
+ if (irq_press < 0)
return irq_press;
- }
irq_release = platform_get_irq_byname(pdev, "release");
- if (irq_release < 0) {
- dev_err(&pdev->dev, "No IRQ for 'release', error=%d\n",
- irq_release);
+ if (irq_release < 0)
return irq_release;
- }
input = devm_input_allocate_device(&pdev->dev);
if (!input)