diff options
-rw-r--r-- | src/gallium/drivers/panfrost/pan_drm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/panfrost/pan_drm.c b/src/gallium/drivers/panfrost/pan_drm.c index 28a4287202b..8ee39c52d4a 100644 --- a/src/gallium/drivers/panfrost/pan_drm.c +++ b/src/gallium/drivers/panfrost/pan_drm.c @@ -154,12 +154,12 @@ panfrost_drm_create_bo(struct panfrost_screen *screen, size_t size, void panfrost_drm_release_bo(struct panfrost_screen *screen, struct panfrost_bo *bo, bool cacheable) { - struct drm_gem_close gem_close = { .handle = bo->gem_handle }; - int ret; - if (!bo) return; + struct drm_gem_close gem_close = { .handle = bo->gem_handle }; + int ret; + /* Rather than freeing the BO now, we'll cache the BO for later * allocations if we're allowed to */ |