diff options
author | Stephen Boyd <swboyd@chromium.org> | 2019-08-14 20:46:38 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-08-14 20:49:01 +0300 |
commit | 0bec8b7e5ca1a629f26173691526432f9d7cf8c1 (patch) | |
tree | 8b002ce844e53e1de228c0c581553473e948d86f /drivers/input/serio | |
parent | f5d4c647d0ddcf4ffcb9ff584fba87a976addcbd (diff) | |
download | linux-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/serio')
-rw-r--r-- | drivers/input/serio/arc_ps2.c | 4 | ||||
-rw-r--r-- | drivers/input/serio/ps2-gpio.c | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/drivers/input/serio/arc_ps2.c b/drivers/input/serio/arc_ps2.c index 443194a2b9e3..0af9fba5d16d 100644 --- a/drivers/input/serio/arc_ps2.c +++ b/drivers/input/serio/arc_ps2.c @@ -187,10 +187,8 @@ static int arc_ps2_probe(struct platform_device *pdev) int error, id, i; irq = platform_get_irq_byname(pdev, "arc_ps2_irq"); - if (irq < 0) { - dev_err(&pdev->dev, "no IRQ defined\n"); + if (irq < 0) return -EINVAL; - } arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(struct arc_ps2_data), GFP_KERNEL); diff --git a/drivers/input/serio/ps2-gpio.c b/drivers/input/serio/ps2-gpio.c index e0f18469d01b..8970b49ea09a 100644 --- a/drivers/input/serio/ps2-gpio.c +++ b/drivers/input/serio/ps2-gpio.c @@ -369,8 +369,6 @@ static int ps2_gpio_probe(struct platform_device *pdev) drvdata->irq = platform_get_irq(pdev, 0); if (drvdata->irq < 0) { - dev_err(dev, "failed to get irq from platform resource: %d\n", - drvdata->irq); error = drvdata->irq; goto err_free_serio; } |