Re: [PATCH v2] rtc: gamecube: Check the return value of ioremap()
From: Alexandre Belloni
Date: Mon Dec 08 2025 - 17:10:52 EST
On Wed, 26 Nov 2025 16:06:25 +0800, Haotian Zhang wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] rtc: gamecube: Check the return value of ioremap()
https://git.kernel.org/abelloni/c/d1220e47e4bd
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com