diff --git a/src/gallium/drivers/panfrost/pan_csf.c b/src/gallium/drivers/panfrost/pan_csf.c index 6333b0ed60c..58d4e01d22e 100644 --- a/src/gallium/drivers/panfrost/pan_csf.c +++ b/src/gallium/drivers/panfrost/pan_csf.c @@ -1040,8 +1040,10 @@ GENX(csf_init_context)(struct panfrost_context *ctx) assert(!ret); /* Wait before freeing the buffer. */ - drmSyncobjWait(panfrost_device_fd(dev), &ctx->syncobj, 1, INT64_MAX, 0, - NULL); + ret = drmSyncobjWait(panfrost_device_fd(dev), &ctx->syncobj, 1, INT64_MAX, + 0, NULL); + assert(!ret); + panfrost_bo_unreference(cs_bo); }