aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-06-06 05:50:03 -0400
committerDave Airlie <airlied@redhat.com>2010-06-07 19:32:02 -0400
commit5a79395b2791cc70442ab8434aed1b5206683e7c (patch)
treee730abdc96aa8de4697b14c8ff995b27fec74409 /drivers/gpu/drm/nouveau
parenta3524f1b27671eda909cde37da9caff41133b272 (diff)
drm: Propagate error from drm_fb_helper_init().
The previous commit fixes the problem, these commits make sure we actually fail properly if it happens again. I've squashed the commits from Chris since they are all fixing one issue. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_fbcon.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index fd4a2df715e..c9a4a0d2a11 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -377,6 +377,7 @@ int nouveau_fbcon_init(struct drm_device *dev)
377{ 377{
378 struct drm_nouveau_private *dev_priv = dev->dev_private; 378 struct drm_nouveau_private *dev_priv = dev->dev_private;
379 struct nouveau_fbdev *nfbdev; 379 struct nouveau_fbdev *nfbdev;
380 int ret;
380 381
381 nfbdev = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL); 382 nfbdev = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL);
382 if (!nfbdev) 383 if (!nfbdev)
@@ -386,7 +387,12 @@ int nouveau_fbcon_init(struct drm_device *dev)
386 dev_priv->nfbdev = nfbdev; 387 dev_priv->nfbdev = nfbdev;
387 nfbdev->helper.funcs = &nouveau_fbcon_helper_funcs; 388 nfbdev->helper.funcs = &nouveau_fbcon_helper_funcs;
388 389
389 drm_fb_helper_init(dev, &nfbdev->helper, 2, 4); 390 ret = drm_fb_helper_init(dev, &nfbdev->helper, 2, 4);
391 if (ret) {
392 kfree(nfbdev);
393 return ret;
394 }
395
390 drm_fb_helper_single_add_all_connectors(&nfbdev->helper); 396 drm_fb_helper_single_add_all_connectors(&nfbdev->helper);
391 drm_fb_helper_initial_config(&nfbdev->helper, 32); 397 drm_fb_helper_initial_config(&nfbdev->helper, 32);
392 return 0; 398 return 0;