diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2014-09-09 09:16:08 -0400 |
---|---|---|
committer | Inki Dae <daeinki@gmail.com> | 2014-09-19 11:56:14 -0400 |
commit | 849b43187a71bfecf37ffbcf2f88a69062240933 (patch) | |
tree | cff7e7fb654e11e658d8ac278687d503c17a1769 | |
parent | 78ef31e20452ddb1c101efae6147b910c5f454f5 (diff) |
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.c | 1 |
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, | |||
165 | 165 | ||
166 | ret = drm_framebuffer_init(dev, &exynos_fb->fb, &exynos_drm_fb_funcs); | 166 | ret = drm_framebuffer_init(dev, &exynos_fb->fb, &exynos_drm_fb_funcs); |
167 | if (ret) { | 167 | if (ret) { |
168 | kfree(exynos_fb); | ||
168 | DRM_ERROR("failed to initialize framebuffer\n"); | 169 | DRM_ERROR("failed to initialize framebuffer\n"); |
169 | return ERR_PTR(ret); | 170 | return ERR_PTR(ret); |
170 | } | 171 | } |