Skip to content

Commit c1030cd

Browse files
bebarinosre
authored andcommitted
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 <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent e008227 commit c1030cd

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

drivers/hsi/controllers/omap_ssi_core.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,8 @@ static int ssi_add_controller(struct hsi_controller *ssi,
370370
if (err < 0)
371371
goto out_err;
372372
err = platform_get_irq_byname(pd, "gdd_mpu");
373-
if (err < 0) {
374-
dev_err(&pd->dev, "GDD IRQ resource missing\n");
373+
if (err < 0)
375374
goto out_err;
376-
}
377375
omap_ssi->gdd_irq = err;
378376
tasklet_init(&omap_ssi->gdd_tasklet, ssi_gdd_tasklet,
379377
(unsigned long)ssi);

drivers/hsi/controllers/omap_ssi_port.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,10 +1038,8 @@ static int ssi_port_irq(struct hsi_port *port, struct platform_device *pd)
10381038
int err;
10391039

10401040
err = platform_get_irq(pd, 0);
1041-
if (err < 0) {
1042-
dev_err(&port->device, "Port IRQ resource missing\n");
1041+
if (err < 0)
10431042
return err;
1044-
}
10451043
omap_port->irq = err;
10461044
err = devm_request_threaded_irq(&port->device, omap_port->irq, NULL,
10471045
ssi_pio_thread, IRQF_ONESHOT, "SSI PORT", port);

0 commit comments

Comments
 (0)