Re: [PATCH] fbcon: Use correct type for vc_resize() return value

From: Helge Deller

Date: Tue May 19 2026 - 03:20:37 EST


On 5/15/26 09:12, Thomas Zimmermann wrote:


Am 14.05.26 um 11:19 schrieb Jiacheng Yu:
The return value of vc_resize() is int, but fbcon_set_disp() stores it
in an unsigned long variable. While the !ret check happens to work
correctly by coincidence (negative values become large positive values),
the types should match. Use int instead.

Eliminates the following W=3 warning:

   drivers/video/fbdev/core/fbcon.c: In function 'fbcon_set_disp':
   drivers/video/fbdev/core/fbcon.c:1494:14: warning: implicit conversion from 'int' to 'unsigned long' [-Wconversion]

Fixes: af0db3c1f898 ("fbdev: Fix vmalloc out-of-bounds write in fast_imageblit")
Signed-off-by: Jiacheng Yu <yujiacheng3@xxxxxxxxxx>

Reviewed-by: Thomas Zimmermann <tzimmermann@xxxxxxx>

applied to fbdev git tree.

Thanks!
Helge