* [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; 7+ 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] 7+ 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
2026-08-20 21:28 ` Alexandre Belloni
0 siblings, 2 replies; 7+ 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] 7+ messages in thread* Re: [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
2026-08-20 21:28 ` Alexandre Belloni
1 sibling, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-07-31 8:08 UTC (permalink / raw)
To: Linkai Gong; +Cc: linux-rtc, Alexandre Belloni
> 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>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260731080458.417532-1-gonglinkai@kylinos.cn?part=1
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [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
@ 2026-08-20 21:28 ` Alexandre Belloni
1 sibling, 0 replies; 7+ messages in thread
From: Alexandre Belloni @ 2026-08-20 21:28 UTC (permalink / raw)
To: Linkai Gong
Cc: Emmanuel Gil Peyrot, Michael Ellerman, linux-rtc, linux-kernel
On Fri, 31 Jul 2026 16:04:58 +0800, Linkai Gong wrote:
> 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.
Applied, thanks!
[1/1] rtc: gamecube: check return value of devm_rtc_register_device()
https://git.kernel.org/abelloni/c/ca45cfa74370
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 7+ 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; 7+ 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] 7+ messages in thread
end of thread, other threads:[~2026-08-20 21:29 UTC | newest]
Thread overview: 7+ 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:04 Linkai Gong
2026-07-31 8:08 ` sashiko-bot
2026-08-20 21:28 ` Alexandre Belloni
2026-07-31 8:02 Linkai Gong
2026-07-31 8:06 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox