From 9019e5e19532fe214fc6e45b9ee1f60bbe332456 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sun, 21 Sep 2014 21:13:33 -0700 Subject: Remove useless checks for NULL before freeing See commits 5067506e and b6109de3 for the Coccinelle script. Reviewed-by: Brian Paul Reviewed-by: Ian Romanick --- src/gallium/winsys/svga/drm/vmw_screen_ioctl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/gallium/winsys/svga') 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; } -- cgit v1.2.3