Skip to content

Commit c2af2a4

Browse files
Jason Andryukhdeller
authored andcommitted
fbdev: xen-fbfront: Assign fb_info->device
Probing xen-fbfront faults in video_is_primary_device(). The passed-in struct device is NULL since xen-fbfront doesn't assign it and the memory is kzalloc()-ed. Assign fb_info->device to avoid this. This was exposed by the conversion of fb_is_primary_device() to video_is_primary_device() which dropped a NULL check for struct device. Fixes: f178e96 ("arch: Remove struct fb_info from video helpers") Reported-by: Arthur Borsboom <arthurborsboom@gmail.com> Closes: https://lore.kernel.org/xen-devel/CALUcmUncX=LkXWeiSiTKsDY-cOe8QksWhFvcCneOKfrKd0ZajA@mail.gmail.com/ Tested-by: Arthur Borsboom <arthurborsboom@gmail.com> CC: stable@vger.kernel.org Signed-off-by: Jason Andryuk <jason.andryuk@amd.com> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 27f22f8 commit c2af2a4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/video/fbdev/xen-fbfront.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ static int xenfb_probe(struct xenbus_device *dev,
407407
/* complete the abuse: */
408408
fb_info->pseudo_palette = fb_info->par;
409409
fb_info->par = info;
410+
fb_info->device = &dev->dev;
410411

411412
fb_info->screen_buffer = info->fb;
412413

0 commit comments

Comments
 (0)