diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2016-07-22 13:31:00 +0200 |
---|---|---|
committer | Sinclair Yeh <syeh@vmware.com> | 2016-07-22 09:29:12 -0700 |
commit | c9e73c10fa19a4ad725678d4f43379dbe4f93e74 (patch) | |
tree | 4fdd1462ea773ab6e72461aa0693b632509806b6 /vmwgfx_execbuf.c | |
parent | 6dadfbb88592e6a69c47619f6699b1643de180f0 (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 <elfring@users.sourceforge.net>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Diffstat (limited to 'vmwgfx_execbuf.c')
-rw-r--r-- | vmwgfx_execbuf.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/vmwgfx_execbuf.c b/vmwgfx_execbuf.c index 4e636d0..ae7ce83 100644 --- a/vmwgfx_execbuf.c +++ b/vmwgfx_execbuf.c @@ -3628,9 +3628,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) { |