diff options
author | Stephen Boyd <swboyd@chromium.org> | 2019-08-14 10:46:38 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-08-14 10:49:01 -0700 |
commit | 0bec8b7e5ca1a629f26173691526432f9d7cf8c1 (patch) | |
tree | 8b002ce844e53e1de228c0c581553473e948d86f /drivers/input/misc/rk805-pwrkey.c | |
parent | f5d4c647d0ddcf4ffcb9ff584fba87a976addcbd (diff) |
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/rk805-pwrkey.c')
-rw-r--r-- | drivers/input/misc/rk805-pwrkey.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/input/misc/rk805-pwrkey.c b/drivers/input/misc/rk805-pwrkey.c index 4a6d4a5746e5..3fb64dbda1a2 100644 --- a/drivers/input/misc/rk805-pwrkey.c +++ b/drivers/input/misc/rk805-pwrkey.c @@ -53,16 +53,12 @@ static int rk805_pwrkey_probe(struct platform_device *pdev) input_set_capability(pwr, EV_KEY, KEY_POWER); fall_irq = platform_get_irq(pdev, 0); - if (fall_irq < 0) { - dev_err(&pdev->dev, "Can't get fall irq: %d\n", fall_irq); + if (fall_irq < 0) return fall_irq; - } rise_irq = platform_get_irq(pdev, 1); - if (rise_irq < 0) { - dev_err(&pdev->dev, "Can't get rise irq: %d\n", rise_irq); + if (rise_irq < 0) return rise_irq; - } err = devm_request_any_context_irq(&pwr->dev, fall_irq, pwrkey_fall_irq, |