Skip to content
Snippets Groups Projects
Commit 7c3b8ed8 authored by Kenneth Graunke's avatar Kenneth Graunke
Browse files

i965/drm: Delete NULL check in brw_bo_unmap().


I accidentally moved the bo->bufmgr dereference above the NULL check
when cleaning up this code.

While passing NULL to free() is a common pattern...passing NULL to
unmap seems pretty bad.  You really ought to know whether you have
a buffer or not.  We don't want to paper over bugs like that.  So,
just drop the NULL check altogether.

CID: 1405006

Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent 9b71709c
No related merge requests found
......@@ -827,9 +827,6 @@ brw_bo_unmap(struct brw_bo *bo)
struct brw_bufmgr *bufmgr = bo->bufmgr;
int ret = 0;
if (bo == NULL)
return 0;
pthread_mutex_lock(&bufmgr->lock);
if (bo->map_count <= 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment