drm/exynos/fb: free exynos framebuffer on error
In case drm_framebuffer_init fails exynos_fb should be freed before returning an error. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
Родитель
78ef31e204
Коммит
849b43187a
|
@ -165,6 +165,7 @@ exynos_drm_framebuffer_init(struct drm_device *dev,
|
|||
|
||||
ret = drm_framebuffer_init(dev, &exynos_fb->fb, &exynos_drm_fb_funcs);
|
||||
if (ret) {
|
||||
kfree(exynos_fb);
|
||||
DRM_ERROR("failed to initialize framebuffer\n");
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче