From: Andrzej Hajda Date: Tue, 9 Sep 2014 13:16:08 +0000 (+0200) Subject: drm/exynos/fb: free exynos framebuffer on error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=849b43187a71bfecf37ffbcf2f88a69062240933;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Inki Dae --- diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c index 65a22cad7b36..d346d1e6eda0 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fb.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c @@ -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); }