Loading
rtc: gamecube: Check the return value of ioremap()
The function ioremap() in gamecube_rtc_read_offset_from_sram() can fail and return NULL, which is dereferenced without checking, leading to a NULL pointer dereference. Add a check for the return value of ioremap() and return -ENOMEM on failure. Fixes: 86559400 ("rtc: gamecube: Add a RTC driver for the GameCube, Wii and Wii U") Signed-off-by:Haotian Zhang <vulab@iscas.ac.cn> Reviewed-by:
Link Mauve <kernel@linkmauve.fr> Link: https://patch.msgid.link/20251126080625.1752-1-vulab@iscas.ac.cn Signed-off-by:
Alexandre Belloni <alexandre.belloni@bootlin.com>