diff options
author | Markus Elfring <[email protected]> | 2016-07-22 13:31:00 +0200 |
---|---|---|
committer | Sean Paul <[email protected]> | 2016-07-22 11:23:40 -0400 |
commit | 0bc329976bc178aacf78ca6e3de8084e8e7eb5e4 (patch) | |
tree | 65679d6c4162bdf46be95390f3d16a7e6f6d3e02 | |
parent | dc3583c86ae08cf89917e1874ae29b5cd651044e (diff) |
drm/vmwgfx: Delete an unnecessary check before the function call "vfree"
The vfree() function performs also input parameter validation.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c index 1a1a87cbf109..dc5beff2b4aa 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c @@ -3625,9 +3625,7 @@ static int vmw_resize_cmd_bounce(struct vmw_sw_context *sw_context, (sw_context->cmd_bounce_size >> 1)); } - if (sw_context->cmd_bounce != NULL) - vfree(sw_context->cmd_bounce); - + vfree(sw_context->cmd_bounce); sw_context->cmd_bounce = vmalloc(sw_context->cmd_bounce_size); if (sw_context->cmd_bounce == NULL) { |