summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-07-24 15:57:28 +1000
committerDave Airlie <airlied@redhat.com>2017-07-24 15:57:28 +1000
commit739b000994b7c813e4cac56c077abd8f6b0ccaab (patch)
tree469be35535b2db6eb5fbd2dcece50bbe45c22e2a /drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
parent507e8e5e5d3fd640e24420be9cbd1c50190bdb4a (diff)
parent8046306fb9dedf216fc37a7dadc0e35ce37e9567 (diff)
downloadop-kernel-dev-739b000994b7c813e4cac56c077abd8f6b0ccaab.zip
op-kernel-dev-739b000994b7c813e4cac56c077abd8f6b0ccaab.tar.gz
Merge branch 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux into drm-fixes
misc vmwgfx fixes. * 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux: drm/vmwgfx: constify pci_device_id. drm/vmwgfx: Fix gcc-7.1.1 warning drm/vmwgfx: Fix cursor hotspot issue with Wayland on Fedora drm/vmwgfx: Limit max desktop dimensions to 8Kx8K drm/vmwgfx: dma-buf: Constify ttm_place structures. drm/vmwgfx: fix comment mistake for vmw_cmd_dx_set_index_buffer() drm/vmwgfx: Use dma_pool_zalloc drm/vmwgfx: Fix handling of errors returned by 'vmw_cotable_alloc()' drm/vmwgfx: Fix NULL pointer comparison
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
index c7b53d9..2cfb3c9 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
@@ -264,7 +264,7 @@ static int vmw_resource_val_add(struct vmw_sw_context *sw_context,
}
node = kzalloc(sizeof(*node), GFP_KERNEL);
- if (unlikely(node == NULL)) {
+ if (unlikely(!node)) {
DRM_ERROR("Failed to allocate a resource validation "
"entry.\n");
return -ENOMEM;
@@ -452,7 +452,7 @@ static int vmw_resource_relocation_add(struct list_head *list,
struct vmw_resource_relocation *rel;
rel = kmalloc(sizeof(*rel), GFP_KERNEL);
- if (unlikely(rel == NULL)) {
+ if (unlikely(!rel)) {
DRM_ERROR("Failed to allocate a resource relocation.\n");
return -ENOMEM;
}
@@ -519,7 +519,7 @@ static int vmw_cmd_invalid(struct vmw_private *dev_priv,
struct vmw_sw_context *sw_context,
SVGA3dCmdHeader *header)
{
- return capable(CAP_SYS_ADMIN) ? : -EINVAL;
+ return -EINVAL;
}
static int vmw_cmd_ok(struct vmw_private *dev_priv,
@@ -2584,7 +2584,7 @@ static int vmw_cmd_dx_set_vertex_buffers(struct vmw_private *dev_priv,
/**
* vmw_cmd_dx_ia_set_vertex_buffers - Validate an
- * SVGA_3D_CMD_DX_IA_SET_VERTEX_BUFFERS command.
+ * SVGA_3D_CMD_DX_IA_SET_INDEX_BUFFER command.
*
* @dev_priv: Pointer to a device private struct.
* @sw_context: The software context being used for this batch.
OpenPOWER on IntegriCloud