summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Fiddaman <omnios@citrus-it.co.uk>2019-09-03 14:06:54 +0000
committerAlexander Pyhalov <apyhalov@gmail.com>2019-12-18 17:42:45 +0300
commite95fe2787bf46c4044b445714824cdbb60be6600 (patch)
treebd322c0a4feae1143dad25d9f6d43b6c6bc0df41
parent714f5e332aaa80ebc2e2bd47d8638075dd43b7ca (diff)
downloadillumos-gfx-drm-e95fe2787bf46c4044b445714824cdbb60be6600.tar.gz
gfx-drm: NULL pointer issues
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
-rw-r--r--usr/src/uts/common/io/drm/drm_kstat.c2
-rw-r--r--usr/src/uts/common/io/drm/drm_sysfs.c6
-rw-r--r--usr/src/uts/intel/io/i915/i915_gem.c8
3 files changed, 8 insertions, 8 deletions
diff --git a/usr/src/uts/common/io/drm/drm_kstat.c b/usr/src/uts/common/io/drm/drm_kstat.c
index c286780..549b8ba 100644
--- a/usr/src/uts/common/io/drm/drm_kstat.c
+++ b/usr/src/uts/common/io/drm/drm_kstat.c
@@ -75,7 +75,7 @@ drm_init_kstats(struct drm_device *sc)
KSTAT_TYPE_NAMED, sizeof (drmkstat_name)/sizeof (char *) - 1,
KSTAT_FLAG_PERSISTENT);
if (ksp == NULL)
- return (NULL);
+ return (0);
ksp->ks_private = sc;
ksp->ks_update = drm_kstat_update;
diff --git a/usr/src/uts/common/io/drm/drm_sysfs.c b/usr/src/uts/common/io/drm/drm_sysfs.c
index ac59805..289924f 100644
--- a/usr/src/uts/common/io/drm/drm_sysfs.c
+++ b/usr/src/uts/common/io/drm/drm_sysfs.c
@@ -64,7 +64,7 @@ int drm_sysfs_device_add(struct drm_minor *minor)
switch (minor->type) {
case DRM_MINOR_AGPMASTER:
- ret = agpmaster_attach(dev->devinfo,
+ ret = agpmaster_attach(dev->devinfo,
(agp_master_softc_t **)&minor->private,
dev->pdev->pci_cfg_acc_handle, minor->index);
if (ret != DDI_SUCCESS) {
@@ -84,7 +84,7 @@ int drm_sysfs_device_add(struct drm_minor *minor)
minor->private = gfxp;
ret = ddi_create_minor_node(dev->devinfo,
- minor->name, S_IFCHR, minor->index, DDI_NT_DISPLAY, NULL);
+ minor->name, S_IFCHR, minor->index, DDI_NT_DISPLAY, 0);
if (ret != DDI_SUCCESS) {
DRM_ERROR("ddi_create_minor_node failed");
return (EFAULT);
@@ -95,7 +95,7 @@ int drm_sysfs_device_add(struct drm_minor *minor)
case DRM_MINOR_CONTROL:
case DRM_MINOR_RENDER:
ret = ddi_create_minor_node(dev->devinfo,
- minor->name, S_IFCHR, minor->index, DDI_NT_DISPLAY_DRM, NULL);
+ minor->name, S_IFCHR, minor->index, DDI_NT_DISPLAY_DRM, 0);
if (ret != DDI_SUCCESS) {
DRM_ERROR("ddi_create_minor_node failed");
return (EFAULT);
diff --git a/usr/src/uts/intel/io/i915/i915_gem.c b/usr/src/uts/intel/io/i915/i915_gem.c
index 18d5af8..6bec5c7 100644
--- a/usr/src/uts/intel/io/i915/i915_gem.c
+++ b/usr/src/uts/intel/io/i915/i915_gem.c
@@ -813,7 +813,7 @@ i915_wait_seqno(struct intel_ring_buffer *ring, uint32_t seqno)
return __wait_seqno(ring, seqno,
atomic_read(&dev_priv->gpu_error.reset_counter),
- interruptible, NULL);
+ interruptible, 0);
}
static int
@@ -889,7 +889,7 @@ i915_gem_object_wait_rendering__nonblocking(struct drm_i915_gem_object *obj,
reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);
mutex_unlock(&dev->struct_mutex);
- ret = __wait_seqno(ring, seqno, reset_counter, true, NULL);
+ ret = __wait_seqno(ring, seqno, reset_counter, true, 0);
mutex_lock(&dev->struct_mutex);
if (ret)
return ret;
@@ -1966,7 +1966,7 @@ i915_gem_wait_ioctl(DRM_IOCTL_ARGS)
struct drm_i915_gem_wait *args = data;
struct drm_i915_gem_object *obj;
struct intel_ring_buffer *ring = NULL;
- clock_t timeout = NULL;
+ clock_t timeout = 0;
unsigned reset_counter;
u32 seqno = 0;
int ret = 0;
@@ -3069,7 +3069,7 @@ i915_gem_ring_throttle(struct drm_device *dev, struct drm_file *file)
if (seqno == 0)
return 0;
- ret = __wait_seqno(ring, seqno, reset_counter, true, NULL);
+ ret = __wait_seqno(ring, seqno, reset_counter, true, 0);
if (ret == 0)
test_set_timer(&dev_priv->mm.retire_timer, 0);