Commit c1030cd4 authored by Stephen Boyd's avatar Stephen Boyd Committed by Sebastian Reichel

HSI: 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: Sebastian Reichel <sre@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent e008227e
......@@ -370,10 +370,8 @@ static int ssi_add_controller(struct hsi_controller *ssi,
if (err < 0)
goto out_err;
err = platform_get_irq_byname(pd, "gdd_mpu");
if (err < 0) {
dev_err(&pd->dev, "GDD IRQ resource missing\n");
if (err < 0)
goto out_err;
}
omap_ssi->gdd_irq = err;
tasklet_init(&omap_ssi->gdd_tasklet, ssi_gdd_tasklet,
(unsigned long)ssi);
......
......@@ -1038,10 +1038,8 @@ static int ssi_port_irq(struct hsi_port *port, struct platform_device *pd)
int err;
err = platform_get_irq(pd, 0);
if (err < 0) {
dev_err(&port->device, "Port IRQ resource missing\n");
if (err < 0)
return err;
}
omap_port->irq = err;
err = devm_request_threaded_irq(&port->device, omap_port->irq, NULL,
ssi_pio_thread, IRQF_ONESHOT, "SSI PORT", port);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment