diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-08-08 13:36:38 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-08-10 10:46:51 +1000 |
commit | cce13ff7596985903ad924504562190a2c163a63 (patch) | |
tree | c60bf375aa1e59727979466ef69804211ac03db9 /drivers/gpu/drm/i915/intel_display.c | |
parent | 0d18abedfadbf462c107b0b782142558896a8ace (diff) | |
download | lwn-cce13ff7596985903ad924504562190a2c163a63.tar.gz lwn-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_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index ae1718549eec..ec8336a4b7de 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5312,18 +5312,18 @@ intel_user_framebuffer_create(struct drm_device *dev, obj = drm_gem_object_lookup(dev, filp, mode_cmd->handle); if (!obj) - return NULL; + return ERR_PTR(-ENOENT); intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL); if (!intel_fb) - return NULL; + return ERR_PTR(-ENOMEM); ret = intel_framebuffer_init(dev, intel_fb, mode_cmd, obj); if (ret) { drm_gem_object_unreference_unlocked(obj); kfree(intel_fb); - return NULL; + return ERR_PTR(ret); } return &intel_fb->base; |