summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2014-09-09 15:16:08 +0200
committerInki Dae <daeinki@gmail.com>2014-09-19 17:56:14 +0200
commit849b43187a71bfecf37ffbcf2f88a69062240933 (patch)
treecff7e7fb654e11e658d8ac278687d503c17a1769
parentdrm/exynos/fbdev: fix fbdev gem object cleanup (diff)
downloadlinux-849b43187a71bfecf37ffbcf2f88a69062240933.tar.xz
linux-849b43187a71bfecf37ffbcf2f88a69062240933.zip
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>
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fb.c1
1 files changed, 1 insertions, 0 deletions
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);
}