fbdev: stifb: Fix crash in stifb_blank()
authorHelge Deller <deller@gmx.de>
Mon, 22 Jan 2024 20:26:33 +0000 (21:26 +0100)
committerHelge Deller <deller@gmx.de>
Tue, 23 Jan 2024 08:13:24 +0000 (09:13 +0100)
Avoid a kernel crash in stifb by providing the correct pointer to the fb_info
struct. Prior to commit e2e0b838a184 ("video/sticore: Remove info field from
STI struct") the fb_info struct was at the beginning of the fb struct.

Fixes: e2e0b838a184 ("video/sticore: Remove info field from STI struct")
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
drivers/video/fbdev/stifb.c

index 2de0e675fd1504da67b7110ee81152934ad2cbad..8e5bac27542d915534c3071ec5f64e89727c2c11 100644 (file)
@@ -1158,7 +1158,7 @@ stifb_init_display(struct stifb_info *fb)
            }
            break;
        }
-       stifb_blank(0, (struct fb_info *)fb);   /* 0=enable screen */
+       stifb_blank(0, fb->info);       /* 0=enable screen */
 
        SETUP_FB(fb);
 }