summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/svga/drm
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-09-21 21:13:33 -0700
committerMatt Turner <[email protected]>2014-12-08 17:02:19 -0800
commit9019e5e19532fe214fc6e45b9ee1f60bbe332456 (patch)
treec382866b78653aea157f085c9cdb8bd3695798e8 /src/gallium/winsys/svga/drm
parentcae7a2a0319e31eef0975edafc730efd3bd2c8d4 (diff)
Remove useless checks for NULL before freeing
See commits 5067506e and b6109de3 for the Coccinelle script. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/gallium/winsys/svga/drm')
-rw-r--r--src/gallium/winsys/svga/drm/vmw_screen_ioctl.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
index c9a3b7544d2..14c3b2068c6 100644
--- a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
+++ b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
@@ -248,8 +248,7 @@ vmw_ioctl_gb_surface_create(struct vmw_winsys_screen *vws,
return rep->handle;
out_fail_create:
- if (region)
- FREE(region);
+ FREE(region);
return SVGA3D_INVALID_ID;
}
@@ -378,8 +377,7 @@ out_fail_ref:
if (needs_unref)
vmw_ioctl_surface_destroy(vws, *handle);
out_fail_req:
- if (region)
- FREE(region);
+ FREE(region);
return ret;
}