Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345614
b: refs/heads/master
c: 662aa6d
h: refs/heads/master
v: v3
  • Loading branch information
Inki Dae authored and Inki Dae committed Dec 13, 2012
1 parent e6abcf0 commit 88629ed
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: db7e55ae527ccbca300eb5b15f5428b83325328d
refs/heads/master: 662aa6d7632cab054277bafda67d13d9a8a81929
24 changes: 17 additions & 7 deletions trunk/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
exynos_gem_obj = exynos_drm_gem_create(dev, 0, size);
if (IS_ERR(exynos_gem_obj)) {
ret = PTR_ERR(exynos_gem_obj);
goto out;
goto err_release_framebuffer;
}

exynos_fbdev->exynos_gem_obj = exynos_gem_obj;
Expand All @@ -174,7 +174,7 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
if (IS_ERR_OR_NULL(helper->fb)) {
DRM_ERROR("failed to create drm framebuffer.\n");
ret = PTR_ERR(helper->fb);
goto out;
goto err_destroy_gem;
}

helper->fbdev = fbi;
Expand All @@ -186,14 +186,24 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
ret = fb_alloc_cmap(&fbi->cmap, 256, 0);
if (ret) {
DRM_ERROR("failed to allocate cmap.\n");
goto out;
goto err_destroy_framebuffer;
}

ret = exynos_drm_fbdev_update(helper, helper->fb);
if (ret < 0) {
fb_dealloc_cmap(&fbi->cmap);
goto out;
}
if (ret < 0)
goto err_dealloc_cmap;

mutex_unlock(&dev->struct_mutex);
return ret;

err_dealloc_cmap:
fb_dealloc_cmap(&fbi->cmap);
err_destroy_framebuffer:
drm_framebuffer_cleanup(helper->fb);
err_destroy_gem:
exynos_drm_gem_destroy(exynos_gem_obj);
err_release_framebuffer:
framebuffer_release(fbi);

/*
* if failed, all resources allocated above would be released by
Expand Down

0 comments on commit 88629ed

Please sign in to comment.