aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/omap_crtc.c
diff options
context:
space:
mode:
authorNoralf Trønnes <noralf@tronnes.org>2019-01-05 19:18:46 +0100
committerNoralf Trønnes <noralf@tronnes.org>2019-01-08 18:46:16 +0100
commit6e1490cf439aa86b104e5124c36275b964238e1f (patch)
tree4405bb851d6c48a0fd67d2d6dbe2c4a25c194142 /drivers/gpu/drm/omapdrm/omap_crtc.c
parentcb66c6daa5e9b2b2aa7ebe956e329c81c1ffe466 (diff)
downloadlinux-6e1490cf439aa86b104e5124c36275b964238e1f.tar.gz
linux-6e1490cf439aa86b104e5124c36275b964238e1f.tar.bz2
linux-6e1490cf439aa86b104e5124c36275b964238e1f.zip
drm/fb-helper: generic: Fix setup error path
If register_framebuffer() fails during fbdev setup we will leak the framebuffer, the GEM buffer and the shadow buffer for defio. This is because drm_fb_helper_fbdev_setup() just calls drm_fb_helper_fini() on error not taking into account that register_framebuffer() can fail. Since the generic emulation uses DRM client for its framebuffer and backing buffer in addition to a shadow buffer, it's necessary to open code drm_fb_helper_fbdev_setup() to properly handle the error path. Error cleanup is removed from .fb_probe and is handled by one function for all paths. Fixes: 9060d7f49376 ("drm/fb-helper: Finish the generic fbdev emulation") Reported-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190105181846.26495-1-noralf@tronnes.org
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_crtc.c')
0 files changed, 0 insertions, 0 deletions