diff options
| author | Linkai Gong <gonglinkai@kylinos.cn> | 2026-07-31 16:04:58 +0800 |
|---|---|---|
| committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2026-08-20 01:04:38 +0200 |
| commit | ca45cfa74370644d371b552bef57938c19e3c80c (patch) | |
| tree | 1082721408c4f6b772b8a61b29626b592e485ca6 | |
| parent | 878d93aaa596a861dbc8d71f7c38e62a2e805f01 (diff) | |
rtc: gamecube: check return value of devm_rtc_register_device()
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>
Link: https://patch.msgid.link/20260731080458.417532-1-gonglinkai@kylinos.cn
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| -rw-r--r-- | drivers/rtc/rtc-gamecube.c | 4 |
1 files changed, 1 insertions, 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[] = { |
