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 <yang.lee@linux.alibaba.com> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230831041414.66434-1-yang.lee@linux.alibaba.com
1 parent 12590d4 commit fd73c01

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

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)