media: Remove dev_err() usage after platform_get_irq()
authorStephen Boyd <swboyd@chromium.org>
Tue, 30 Jul 2019 18:15:25 +0000 (15:15 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 7 Aug 2019 20:08:33 +0000 (17:08 -0300)
commit97299a3035328d7ae2f4fccaf6e549974df6e118
treefe938180184e3a09b055c29c923f0d789a190332
parent25a3d6bac6b9ff7d62033185780daa1b4f7bee2f
media: 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
17 files changed:
drivers/media/platform/am437x/am437x-vpfe.c
drivers/media/platform/atmel/atmel-sama5d2-isc.c
drivers/media/platform/exynos4-is/mipi-csis.c
drivers/media/platform/imx-pxp.c
drivers/media/platform/omap3isp/isp.c
drivers/media/platform/renesas-ceu.c
drivers/media/platform/rockchip/rga/rga.c
drivers/media/platform/s3c-camif/camif-core.c
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
drivers/media/platform/sti/hva/hva-hw.c
drivers/media/platform/stm32/stm32-dcmi.c
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
drivers/media/rc/img-ir/img-ir-core.c
drivers/media/rc/ir-hix5hd2.c
drivers/media/rc/meson-ir.c
drivers/media/rc/mtk-cir.c
drivers/media/rc/sunxi-cir.c