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/radeon/radeon_display.c | |
parent | 0d18abedfadbf462c107b0b782142558896a8ace (diff) | |
download | blackbird-op-linux-cce13ff7596985903ad924504562190a2c163a63.tar.gz blackbird-op-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/radeon/radeon_display.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_display.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index d49a14891f83..6130ec9ed502 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -888,13 +888,12 @@ radeon_user_framebuffer_create(struct drm_device *dev, if (obj == NULL) { dev_err(&dev->pdev->dev, "No GEM object associated to handle 0x%08X, " "can't create framebuffer\n", mode_cmd->handle); - return NULL; + return ERR_PTR(-ENOENT); } radeon_fb = kzalloc(sizeof(*radeon_fb), GFP_KERNEL); - if (radeon_fb == NULL) { - return NULL; - } + if (radeon_fb == NULL) + return ERR_PTR(-ENOMEM); radeon_framebuffer_init(dev, radeon_fb, mode_cmd, obj); |