summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_fbcon.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-01-27 01:54:11 +0300
committerDave Airlie <airlied@redhat.com>2015-01-27 01:54:11 +0300
commite4514003c6d0afd0a2d7e23e397530d746f34057 (patch)
tree0a87f4514fc938b2f9df5a731f03fb1c23c11a3e /drivers/gpu/drm/nouveau/nouveau_fbcon.c
parentbdfcea4bdcd354023b1a93abdaf6b176c3dd545b (diff)
parentb7703726251191cd9f3ef3a80b2d9667901eec95 (diff)
downloadlinux-e4514003c6d0afd0a2d7e23e397530d746f34057.tar.xz
Merge tag 'topic/core-stuff-2015-01-23' of git://anongit.freedesktop.org/drm-intel into drm-next
Just flushing out my drm-misc branch, nothing major. Well too old patches I've dug out from years since a patch from Rob look eerily familiar ;-) * tag 'topic/core-stuff-2015-01-23' of git://anongit.freedesktop.org/drm-intel: drm/probe-helper: clamp unknown connector status in the poll work drm/probe-helper: don't lose hotplug event next: drm/atomic: Use copy_from_user to copy 64 bit data from user space drm: Make drm_read() more robust against multithreaded races drm/fb-helper: Propagate errors from initial config failure drm: Drop superfluous "select VT_HW_CONSOLE_BINDING"
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_fbcon.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_fbcon.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index d6e6958bc5f8..79924e4b1b49 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -526,12 +526,12 @@ nouveau_fbcon_init(struct drm_device *dev)
ret = drm_fb_helper_init(dev, &fbcon->helper,
dev->mode_config.num_crtc, 4);
- if (ret) {
- kfree(fbcon);
- return ret;
- }
+ if (ret)
+ goto free;
- drm_fb_helper_single_add_all_connectors(&fbcon->helper);
+ ret = drm_fb_helper_single_add_all_connectors(&fbcon->helper);
+ if (ret)
+ goto fini;
if (drm->device.info.ram_size <= 32 * 1024 * 1024)
preferred_bpp = 8;
@@ -544,8 +544,17 @@ nouveau_fbcon_init(struct drm_device *dev)
/* disable all the possible outputs/crtcs before entering KMS mode */
drm_helper_disable_unused_functions(dev);
- drm_fb_helper_initial_config(&fbcon->helper, preferred_bpp);
+ ret = drm_fb_helper_initial_config(&fbcon->helper, preferred_bpp);
+ if (ret)
+ goto fini;
+
return 0;
+
+fini:
+ drm_fb_helper_fini(&fbcon->helper);
+free:
+ kfree(fbcon);
+ return ret;
}
void