diff mbox series

[-next] rtc: sunplus: Clean up redundant dev_err_probe()

Message ID 20230802093650.976352-1-chenjiahao16@huawei.com
State Accepted
Headers show
Series [-next] rtc: sunplus: Clean up redundant dev_err_probe() | expand

Commit Message

Chen Jiahao Aug. 2, 2023, 9:36 a.m. UTC
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>
---
 drivers/rtc/rtc-sunplus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexandre Belloni Aug. 10, 2023, 7:36 a.m. UTC | #1
On Wed, 02 Aug 2023 17:36:50 +0800, Chen Jiahao wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] rtc: sunplus: Clean up redundant dev_err_probe()
      commit: df9c16b5ccc8e4aab5e492b5f110167c75c74b0a

Best regards,
diff mbox series

Patch

diff --git a/drivers/rtc/rtc-sunplus.c b/drivers/rtc/rtc-sunplus.c
index f33dc301f301..20c7e97c2fc8 100644
--- a/drivers/rtc/rtc-sunplus.c
+++ b/drivers/rtc/rtc-sunplus.c
@@ -244,7 +244,7 @@  static int sp_rtc_probe(struct platform_device *plat_dev)
 
 	sp_rtc->irq = platform_get_irq(plat_dev, 0);
 	if (sp_rtc->irq < 0)
-		return dev_err_probe(&plat_dev->dev, sp_rtc->irq, "platform_get_irq failed\n");
+		return sp_rtc->irq;
 
 	ret = devm_request_irq(&plat_dev->dev, sp_rtc->irq, sp_rtc_irq_handler,
 			       IRQF_TRIGGER_RISING, "rtc irq", plat_dev);