summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_fb.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-08-08 13:36:38 +0100
committerDave Airlie <airlied@redhat.com>2010-08-10 10:46:51 +1000
commitcce13ff7596985903ad924504562190a2c163a63 (patch)
treec60bf375aa1e59727979466ef69804211ac03db9 /drivers/gpu/drm/i915/intel_fb.c
parent0d18abedfadbf462c107b0b782142558896a8ace (diff)
downloadlinux-cce13ff7596985903ad924504562190a2c163a63.tar.gz
linux-cce13ff7596985903ad924504562190a2c163a63.tar.bz2
linux-cce13ff7596985903ad924504562190a2c163a63.zip
drm: Propagate error code from fb_create()
Change the interface to expect a PTR_ERR specifing the real error code as opposed to assuming a NULL return => -EINVAL. Just once the user may not be at fault! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_fb.c')
-rw-r--r--drivers/gpu/drm/i915/intel_fb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index 3e18c9e7729b..1d2d67ce4a84 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -119,7 +119,9 @@ static int intelfb_create(struct intel_fbdev *ifbdev,
info->par = ifbdev;
- intel_framebuffer_init(dev, &ifbdev->ifb, &mode_cmd, fbo);
+ ret = intel_framebuffer_init(dev, &ifbdev->ifb, &mode_cmd, fbo);
+ if (ret)
+ goto out_unpin;
fb = &ifbdev->ifb.base;