• Tomi Valkeinen's avatar
    drm/omap: fix error handling in omap_framebuffer_create() · 925e4940
    Tomi Valkeinen authored
    When an error happens in omap_framebuffer_create(),
    omap_framebuffer_create() calls omap_framebuffer_destroy() if the fb
    struct has been allocated. However, that crashes, as
    omap_framebuffer_destroy(), which calls drm_framebuffer_cleanup(),
    should only be called after drm_framebuffer_init()
    
    Fix this by just calling kfree() for the allocated fb when an error
    happens.
    Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
    925e4940
omap_fb.c 12.1 KB