On Thu, 22 Sep 2011 16:27:11 -0700, Ben Widawsky <b...@bwidawsk.net> wrote: > +/** > + * unmap an object in the non-blocking mode > + */ > +int drm_intel_gem_bo_unmap_nonblocking(drm_intel_bo *bo) > +{ > + drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; > + int ret = 0; > + > + if (bo == NULL) > + return 0; > + > + pthread_mutex_lock(&bufmgr_gem->lock); > + bo->virtual = NULL; > + pthread_mutex_unlock(&bufmgr_gem->lock); > + > + return ret;
You dereffed bo before checking for NULL, so the compiler will just drop that NULL check. I realize this is copy'n'paste from bo_unmap_gtt, but I don't see why this new copy of bo_unmap_gtt exists anyway.
pgppNXFr6LQCG.pgp
Description: PGP signature
_______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx