diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-08-21 09:33:39 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-08-21 10:38:31 -0700 |
commit | c43fa6b3209b229ac7b31fa7ce49a556f1c4d7ad (patch) | |
tree | 1fae99c6e7670525ee54cf10fb0c86fc639417fd /src | |
parent | a3c1ab2e9aae82b7b4e69679aefaefea2d9dc07f (diff) |
panfrost: Hoist bo != NULL check before dereference
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-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 */ |