diff options
-rw-r--r-- | src/etnaviv/drm/etnaviv_bo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/etnaviv/drm/etnaviv_bo.c b/src/etnaviv/drm/etnaviv_bo.c index 6e952fa4785..2b1fbbbc3c7 100644 --- a/src/etnaviv/drm/etnaviv_bo.c +++ b/src/etnaviv/drm/etnaviv_bo.c @@ -238,11 +238,11 @@ out_unlock: /* destroy a buffer object */ void etna_bo_del(struct etna_bo *bo) { - struct etna_device *dev = bo->dev; - if (!bo) return; + struct etna_device *dev = bo->dev; + if (!p_atomic_dec_zero(&bo->refcnt)) return; |