Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Yang Li and committed by
Daniel Lezcano
fd73c011 12590d4d

+1 -3
+1 -3
drivers/clocksource/timer-sun5i.c
··· 256 256 } 257 257 258 258 irq = platform_get_irq(pdev, 0); 259 - if (irq < 0) { 260 - dev_err(dev, "Can't get IRQ\n"); 259 + if (irq < 0) 261 260 return irq; 262 - } 263 261 264 262 clk = devm_clk_get_enabled(dev, NULL); 265 263 if (IS_ERR(clk)) {