Skip to content

Commit df9c16b

Browse files
Chen Jiahaoalexandrebelloni
authored andcommitted
rtc: sunplus: Clean up redundant dev_err_probe()
Referring to platform_get_irq()'s definition, the return value has already been checked if ret < 0, and printed via dev_err_probe(). Calling dev_err_probe() one more time outside platform_get_irq() is obviously redundant. Removing dev_err_probe() outside platform_get_irq() to clean up above problem. Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com> Link: https://lore.kernel.org/r/20230802093650.976352-1-chenjiahao16@huawei.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent a69c610 commit df9c16b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/rtc/rtc-sunplus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ static int sp_rtc_probe(struct platform_device *plat_dev)
244244

245245
sp_rtc->irq = platform_get_irq(plat_dev, 0);
246246
if (sp_rtc->irq < 0)
247-
return dev_err_probe(&plat_dev->dev, sp_rtc->irq, "platform_get_irq failed\n");
247+
return sp_rtc->irq;
248248

249249
ret = devm_request_irq(&plat_dev->dev, sp_rtc->irq, sp_rtc_irq_handler,
250250
IRQF_TRIGGER_RISING, "rtc irq", plat_dev);

0 commit comments

Comments
 (0)