diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-08-08 14:36:38 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-08-10 02:46:51 +0200 |
commit | cce13ff7596985903ad924504562190a2c163a63 (patch) | |
tree | c60bf375aa1e59727979466ef69804211ac03db9 /drivers/gpu/drm/drm_crtc.c | |
parent | radeon: handle errors in radeon_hwmon_init() (diff) | |
download | linux-cce13ff7596985903ad924504562190a2c163a63.tar.xz 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/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 4c68f76993d8..bdd0d903872a 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -1682,9 +1682,9 @@ int drm_mode_addfb(struct drm_device *dev, /* TODO setup destructor callback */ fb = dev->mode_config.funcs->fb_create(dev, file_priv, r); - if (!fb) { + if (IS_ERR(fb)) { DRM_ERROR("could not create framebuffer\n"); - ret = -EINVAL; + ret = PTR_ERR(fb); goto out; } |