summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_drv.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_drv.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_drv.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_drv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 4a64155..4436d53 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -227,7 +227,7 @@ static const struct drm_ioctl_desc vmw_ioctls[] = {
DRM_AUTH | DRM_RENDER_ALLOW),
};
-static struct pci_device_id vmw_pci_id_list[] = {
+static const struct pci_device_id vmw_pci_id_list[] = {
{0x15ad, 0x0405, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VMWGFX_CHIP_SVGAII},
{0, 0, 0}
};
@@ -630,7 +630,7 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
char host_log[100] = {0};
dev_priv = kzalloc(sizeof(*dev_priv), GFP_KERNEL);
- if (unlikely(dev_priv == NULL)) {
+ if (unlikely(!dev_priv)) {
DRM_ERROR("Failed allocating a device private struct.\n");
return -ENOMEM;
}
@@ -1035,7 +1035,7 @@ static int vmw_driver_open(struct drm_device *dev, struct drm_file *file_priv)
int ret = -ENOMEM;
vmw_fp = kzalloc(sizeof(*vmw_fp), GFP_KERNEL);
- if (unlikely(vmw_fp == NULL))
+ if (unlikely(!vmw_fp))
return ret;
vmw_fp->tfile = ttm_object_file_init(dev_priv->tdev, 10);
@@ -1196,7 +1196,7 @@ static int vmw_master_create(struct drm_device *dev,
struct vmw_master *vmaster;
vmaster = kzalloc(sizeof(*vmaster), GFP_KERNEL);
- if (unlikely(vmaster == NULL))
+ if (unlikely(!vmaster))
return -ENOMEM;
vmw_master_init(vmaster);
OpenPOWER on IntegriCloud