[PATCH] drm/efidrm: ensure screen_base is initialized
Thomas Zimmermann
tzimmermann at suse.de
Fri Apr 11 13:52:27 UTC 2025
Hi Arnd
Am 11.04.25 um 15:11 schrieb Javier Martinez Canillas:
> Arnd Bergmann <arnd at kernel.org> writes:
>
> Hello Arnd,
>
>> From: Arnd Bergmann <arnd at arndb.de>
Thanks for the fix.
>>
>> clang points out that there is a code path that leads to undefined behavior:
>>
>> drivers/gpu/drm/sysfb/efidrm.c:353:11: error: variable 'screen_base' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
>> 353 | else if (mem_flags & EFI_MEMORY_WB)
>> | ^~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> Add the missing initialization.
>>
>> Fixes: 32ae90c66fb6 ("drm/sysfb: Add efidrm for EFI displays")
>> Signed-off-by: Arnd Bergmann <arnd at arndb.de>
>> ---
> A similar patch has been proposed by Nathan already and acked by Thomas:
>
> https://lists.freedesktop.org/archives/dri-devel/2025-April/500539.html
I've meanwhile merged this patch into drm-misc-next.
Best regards
Thomas
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
More information about the dri-devel
mailing list