diff --git a/src/asahi/lib/agx_device.c b/src/asahi/lib/agx_device.c index 35aa8a672e3..910ec08d5f9 100644 --- a/src/asahi/lib/agx_device.c +++ b/src/asahi/lib/agx_device.c @@ -283,8 +283,7 @@ agx_bo_import(struct agx_device *dev, int fd) * for zero sized maps and fail nicely too */ if ((bo->size == 0) || (bo->size == (size_t)-1)) { - pthread_mutex_unlock(&dev->bo_map_lock); - return NULL; + goto error; } if (bo->size & (AIL_PAGESIZE - 1)) { fprintf(