diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-02-28 08:03:10 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-02-28 08:03:10 +0100 |
commit | 5838d18955b52467f4b30486e62a31727b39998d (patch) | |
tree | 8aeb8412156bab93a6b39f2de4a8d6c912ddb31a /drivers/gpu/drm/ast/ast_fb.c | |
parent | x86/platform/intel-mid: Fix trivial printk message typo in intel_mid_arch_set... (diff) | |
parent | Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff) | |
download | linux-5838d18955b52467f4b30486e62a31727b39998d.tar.xz linux-5838d18955b52467f4b30486e62a31727b39998d.zip |
Merge branch 'linus' into x86/urgent, to merge dependent patch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/ast/ast_fb.c')
-rw-r--r-- | drivers/gpu/drm/ast/ast_fb.c | 21 |
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) |