vmwgfx: Use pointer return error codes
authorJakob Bornecrantz <jakob@vmware.com>
Thu, 3 Nov 2011 20:03:04 +0000 (21:03 +0100)
committerDave Airlie <airlied@redhat.com>
Mon, 7 Nov 2011 13:15:54 +0000 (13:15 +0000)
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

index 5ccce1c..41a905d 100644 (file)
@@ -997,7 +997,7 @@ static struct drm_framebuffer *vmw_kms_fb_create(struct drm_device *dev,
        required_size = mode_cmd->pitch * mode_cmd->height;
        if (unlikely(required_size > (u64) dev_priv->vram_size)) {
                DRM_ERROR("VRAM size is too small for requested mode.\n");
-               return NULL;
+               return ERR_PTR(-ENOMEM);
        }
 
        /*