Files
Haotian Zhang 5998ad91f8 rtc: gamecube: Check the return value of ioremap()
[ Upstream commit d1220e47e4 ]

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: 86559400b3 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-12-18 13:55:20 +01:00
..
2024-09-27 08:18:43 -07:00
2024-01-18 01:00:21 +01:00
2023-10-15 23:01:08 +02:00
2024-08-28 21:54:51 +01:00
2024-09-22 01:17:10 +02:00
2025-05-29 11:02:16 +02:00
2024-05-07 23:40:10 +02:00
2023-04-26 11:40:26 +01:00
2024-09-12 00:33:24 +02:00
2024-09-12 00:08:09 +02:00