Skip to content
Commit 925e4940 authored by Tomi Valkeinen's avatar Tomi Valkeinen
Browse files

drm/omap: fix error handling in omap_framebuffer_create()



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>
parent c7c1aecd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment