aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ast/ast_fb.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-06-24 12:18:41 +0800
committerAlex Shi <alex.shi@linaro.org>2016-06-24 12:18:41 +0800
commitbbe8f0ee88a1eb4bb1e72e593b008faf387f30ac (patch)
tree83368f0950f7396944642057dd521044b696b7f5 /drivers/gpu/drm/ast/ast_fb.c
parent1beb6ea36b283c1dc34812c6ef9bf56a1e494f8c (diff)
parentd420f00c7bfb405884dd71fb7f87974f0d1be455 (diff)
downloadlinux-linaro-stable-bbe8f0ee88a1eb4bb1e72e593b008faf387f30ac.tar.gz
Merge tag 'v3.18.36' into linux-linaro-lsk-v3.18lsk-v3.18-16.06
This is the 3.18.36 stable release
Diffstat (limited to 'drivers/gpu/drm/ast/ast_fb.c')
-rw-r--r--drivers/gpu/drm/ast/ast_fb.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c
index 5c60ae524c45..ff68eefae273 100644
--- a/drivers/gpu/drm/ast/ast_fb.c
+++ b/drivers/gpu/drm/ast/ast_fb.c
@@ -335,18 +335,27 @@ int ast_fbdev_init(struct drm_device *dev)
ret = drm_fb_helper_init(dev, &afbdev->helper,
1, 1);
- if (ret) {
- kfree(afbdev);
- return ret;
- }
+ if (ret)
+ goto free;
- drm_fb_helper_single_add_all_connectors(&afbdev->helper);
+ ret = drm_fb_helper_single_add_all_connectors(&afbdev->helper);
+ if (ret)
+ goto fini;
/* disable all the possible outputs/crtcs before entering KMS mode */
drm_helper_disable_unused_functions(dev);
- drm_fb_helper_initial_config(&afbdev->helper, 32);
+ ret = drm_fb_helper_initial_config(&afbdev->helper, 32);
+ if (ret)
+ goto fini;
+
return 0;
+
+fini:
+ drm_fb_helper_fini(&afbdev->helper);
+free:
+ kfree(afbdev);
+ return ret;
}
void ast_fbdev_fini(struct drm_device *dev)