diff options
author | Stephen Boyd <swboyd@chromium.org> | 2019-08-14 19:46:38 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-08-14 19:49:01 +0200 |
commit | 0bec8b7e5ca1a629f26173691526432f9d7cf8c1 (patch) | |
tree | 8b002ce844e53e1de228c0c581553473e948d86f /drivers/input/touchscreen/imx6ul_tsc.c | |
parent | Input: applespi - no need to check return value of debugfs_create functions (diff) | |
download | linux-0bec8b7e5ca1a629f26173691526432f9d7cf8c1.tar.xz linux-0bec8b7e5ca1a629f26173691526432f9d7cf8c1.zip |
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/touchscreen/imx6ul_tsc.c')
-rw-r--r-- | drivers/input/touchscreen/imx6ul_tsc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/input/touchscreen/imx6ul_tsc.c b/drivers/input/touchscreen/imx6ul_tsc.c index e04eecd65bbb..9ed258854349 100644 --- a/drivers/input/touchscreen/imx6ul_tsc.c +++ b/drivers/input/touchscreen/imx6ul_tsc.c @@ -430,16 +430,12 @@ static int imx6ul_tsc_probe(struct platform_device *pdev) } tsc_irq = platform_get_irq(pdev, 0); - if (tsc_irq < 0) { - dev_err(&pdev->dev, "no tsc irq resource?\n"); + if (tsc_irq < 0) return tsc_irq; - } adc_irq = platform_get_irq(pdev, 1); - if (adc_irq < 0) { - dev_err(&pdev->dev, "no adc irq resource?\n"); + if (adc_irq < 0) return adc_irq; - } err = devm_request_threaded_irq(tsc->dev, tsc_irq, NULL, tsc_irq_fn, IRQF_ONESHOT, |