summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Ross <gordon.w.ross@gmail.com>2016-12-30 21:33:46 -0500
committerGordon Ross <gordon.w.ross@gmail.com>2017-01-03 22:59:11 -0500
commit8205d688ff9c56cd0a3b214bcf8087b7f1e6795a (patch)
treef17ad6ae73f30db98f91ca36711fba4dd21da922
parentd687f7021eb7dd043fc3d1b0a5b3d503f2d34bb1 (diff)
downloadillumos-gfx-drm-8205d688ff9c56cd0a3b214bcf8087b7f1e6795a.tar.gz
7726 compiler warning in agpgart.c
Reviewed by: Toomas Soome <tsoome@me.com>
-rw-r--r--usr/src/uts/intel/io/agpgart/agpgart.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/uts/intel/io/agpgart/agpgart.c b/usr/src/uts/intel/io/agpgart/agpgart.c
index 34f5ca5..1fa86fb 100644
--- a/usr/src/uts/intel/io/agpgart/agpgart.c
+++ b/usr/src/uts/intel/io/agpgart/agpgart.c
@@ -142,6 +142,7 @@ static void
amd64_gart_unregister(amd64_garts_dev_t *cpu_garts);
+/*ARGSUSED*/
static void
agp_devmap_unmap(devmap_cookie_t handle, void *devprivate,
offset_t off, size_t len, devmap_cookie_t new_handle1,
@@ -149,7 +150,7 @@ agp_devmap_unmap(devmap_cookie_t handle, void *devprivate,
void **new_devprivate2)
{
- struct keytable_ent *mementry;
+ struct keytable_ent *mementry = NULL;
agpgart_softstate_t *softstate;
agpgart_ctx_t *ctxp, *newctxp1, *newctxp2;
@@ -187,7 +188,7 @@ agp_devmap_unmap(devmap_cookie_t handle, void *devprivate,
ASSERT(mementry);
mementry->kte_refcnt++;
}
- ASSERT(mementry->kte_refcnt >= 0);
+ ASSERT(mementry == NULL || mementry->kte_refcnt >= 0);
mutex_exit(&softstate->asoft_instmutex);
kmem_free(ctxp, sizeof (struct agpgart_ctx));
}