Skip to content

Commit fd73c01

Browse files
Yang Lidlezcano
authored andcommitted
clocksource/drivers/sun5i: Remove surplus dev_err() when using platform_get_irq()
There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. ./drivers/clocksource/timer-sun5i.c:260:2-9: line 260 is redundant because platform_get_irq() already prints an error Signed-off-by: Yang Li <[email protected]> Acked-by: Jernej Skrabec <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 12590d4 commit fd73c01

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/clocksource/timer-sun5i.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,8 @@ static int sun5i_timer_probe(struct platform_device *pdev)
256256
}
257257

258258
irq = platform_get_irq(pdev, 0);
259-
if (irq < 0) {
260-
dev_err(dev, "Can't get IRQ\n");
259+
if (irq < 0)
261260
return irq;
262-
}
263261

264262
clk = devm_clk_get_enabled(dev, NULL);
265263
if (IS_ERR(clk)) {

0 commit comments

Comments
 (0)