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>
This commit is contained in:
committed by
Dave Airlie
parent
0d18abedfa
commit
cce13ff759
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user