[PATCH v2] drm: udl: Destroy framebuffer only if it was initialized

2018-05-29 Thread Emil Lundmark
(you can see it does if (!udl->fbdev)) but that doesn't work, because udl->fbdev is always set during udl_fbdev_init. Suggested-by: Sean Paul Signed-off-by: Emil Lundmark --- Changes in v2: - Updated commit message with explanation from Stéphane Marchesin drivers/gpu/drm/udl/ud

[PATCH] drm: udl: Destroy framebuffer only if it was initialized

2018-04-21 Thread Emil Lundmark
This fixes a NULL pointer dereference that can happen if the UDL driver is unloaded before the framebuffer is initialized. This can happen e.g. if the USB device is unplugged right after it was plugged in. Signed-off-by: Emil Lundmark --- drivers/gpu/drm/udl/udl_fb.c | 8 +--- 1 file