summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurchetan Singh <gurchetansingh@chromium.org>2017-11-07 17:21:58 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-11-08 15:10:10 -0800
commit425173a0c8170528f804b2a9bd02b71fa47d754b (patch)
tree80752f68b8b160aad3c43ede16d71613a1a34af4
parent3e9d3830dce97cb0146b9f6e0f4942253f39ca69 (diff)
minigbm: fix map time assertions
We should assert when the refcount is equal to zero as well. BUG=chromium:764871 TEST=gbmtest passes Change-Id: Iaf8b5bd4bf51472ad7c564341b42a7079b58bd6e Reviewed-on: https://chromium-review.googlesource.com/758143 Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
-rw-r--r--drv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drv.c b/drv.c
index 99ec561..d5d8ec1 100644
--- a/drv.c
+++ b/drv.c
@@ -458,7 +458,7 @@ int drv_bo_invalidate(struct bo *bo, struct map_info *data)
{
int ret = 0;
assert(data);
- assert(data->refcount >= 0);
+ assert(data->refcount > 0);
if (bo->drv->backend->bo_invalidate)
ret = bo->drv->backend->bo_invalidate(bo, data);
@@ -470,7 +470,7 @@ int drv_bo_flush(struct bo *bo, struct map_info *data)
{
int ret = 0;
assert(data);
- assert(data->refcount >= 0);
+ assert(data->refcount > 0);
assert(!(bo->use_flags & BO_USE_PROTECTED));
if (bo->drv->backend->bo_flush)