All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: gamecube: check return value of devm_rtc_register_device()
@ 2026-07-31  8:02 Linkai Gong
  2026-07-31  8:06 ` sashiko-bot
  0 siblings, 1 reply; 6+ messages in thread
From: Linkai Gong @ 2026-07-31  8:02 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Emmanuel Gil Peyrot, Michael Ellerman, linux-rtc, linux-kernel,
	Linkai Gong

gamecube_rtc_probe() ignored the return value of
devm_rtc_register_device() and always returned success. Propagate the
error so probe fails when RTC registration fails.

Fixes: 86559400b3ef ("rtc: gamecube: Add a RTC driver for the GameCube, Wii and Wii U")
Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
---
 drivers/rtc/rtc-gamecube.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-gamecube.c b/drivers/rtc/rtc-gamecube.c
index 045d5d45ab4b..889028cecf4a 100644
--- a/drivers/rtc/rtc-gamecube.c
+++ b/drivers/rtc/rtc-gamecube.c
@@ -355,9 +355,7 @@ static int gamecube_rtc_probe(struct platform_device *pdev)
 	rtc->range_max = U32_MAX;
 	rtc->ops = &gamecube_rtc_ops;
 
-	devm_rtc_register_device(rtc);
-
-	return 0;
+	return devm_rtc_register_device(rtc);
 }
 
 static const struct of_device_id gamecube_rtc_of_match[] = {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] rtc: gamecube: check return value of devm_rtc_register_device()
@ 2026-07-31  8:02 Linkai Gong
  2026-07-31  8:06 ` sashiko-bot
  0 siblings, 1 reply; 6+ messages in thread
From: Linkai Gong @ 2026-07-31  8:02 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Emmanuel Gil Peyrot, Michael Ellerman, linux-rtc, linux-kernel,
	Linkai Gong

gamecube_rtc_probe() ignored the return value of
devm_rtc_register_device() and always returned success. Propagate the
error so probe fails when RTC registration fails.

Fixes: 86559400b3ef ("rtc: gamecube: Add a RTC driver for the GameCube, Wii and Wii U")
Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
---
 drivers/rtc/rtc-gamecube.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-gamecube.c b/drivers/rtc/rtc-gamecube.c
index 045d5d45ab4b..889028cecf4a 100644
--- a/drivers/rtc/rtc-gamecube.c
+++ b/drivers/rtc/rtc-gamecube.c
@@ -355,9 +355,7 @@ static int gamecube_rtc_probe(struct platform_device *pdev)
 	rtc->range_max = U32_MAX;
 	rtc->ops = &gamecube_rtc_ops;
 
-	devm_rtc_register_device(rtc);
-
-	return 0;
+	return devm_rtc_register_device(rtc);
 }
 
 static const struct of_device_id gamecube_rtc_of_match[] = {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] rtc: gamecube: check return value of devm_rtc_register_device()
@ 2026-07-31  8:04 Linkai Gong
  2026-07-31  8:08 ` sashiko-bot
  0 siblings, 1 reply; 6+ messages in thread
From: Linkai Gong @ 2026-07-31  8:04 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Emmanuel Gil Peyrot, Michael Ellerman, linux-rtc, linux-kernel,
	Linkai Gong

gamecube_rtc_probe() ignored the return value of
devm_rtc_register_device() and always returned success. Propagate the
error so probe fails when RTC registration fails.

Fixes: 86559400b3ef ("rtc: gamecube: Add a RTC driver for the GameCube, Wii and Wii U")
Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
---
 drivers/rtc/rtc-gamecube.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-gamecube.c b/drivers/rtc/rtc-gamecube.c
index 045d5d45ab4b..889028cecf4a 100644
--- a/drivers/rtc/rtc-gamecube.c
+++ b/drivers/rtc/rtc-gamecube.c
@@ -355,9 +355,7 @@ static int gamecube_rtc_probe(struct platform_device *pdev)
 	rtc->range_max = U32_MAX;
 	rtc->ops = &gamecube_rtc_ops;
 
-	devm_rtc_register_device(rtc);
-
-	return 0;
+	return devm_rtc_register_device(rtc);
 }
 
 static const struct of_device_id gamecube_rtc_of_match[] = {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-31  8:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31  8:02 [PATCH] rtc: gamecube: check return value of devm_rtc_register_device() Linkai Gong
2026-07-31  8:06 ` sashiko-bot
  -- strict thread matches above, loose matches on Subject: below --
2026-07-31  8:02 Linkai Gong
2026-07-31  8:06 ` sashiko-bot
2026-07-31  8:04 Linkai Gong
2026-07-31  8:08 ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.