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 5ccce1c3daf9bcf7efe44f96ef50b3269ea777b6..41a905d6c4f1ef5dafc6badd474ac6ea98048c94 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);
        }
 
        /*