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: 86559400b3 ("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>
This commit is contained in:
Linkai Gong
2026-07-31 16:04:58 +08:00
committed by Alexandre Belloni
parent 878d93aaa5
commit ca45cfa743

View File

@@ -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[] = {