mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
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:
committed by
Alexandre Belloni
parent
878d93aaa5
commit
ca45cfa743
@@ -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[] = {
|
||||
|
||||
Reference in New Issue
Block a user