aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2014-11-19 11:50:19 -0500
committerDave Airlie <airlied@redhat.com>2014-11-20 21:16:40 -0500
commita3a1a6674f7fd6c0f7e673c4fc1b1aea3d8fce53 (patch)
tree829004d1f36690692865ef1dbede402157d81db0
parente9196d238597da0189b035f37c473c411275b0dd (diff)
drm/vmwgfx: Deletion of an unnecessary check before the function call "vfree"
The vfree() function performes 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: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_drv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 25f3c250fd98..db7621828bc7 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -889,8 +889,7 @@ static int vmw_driver_unload(struct drm_device *dev)
889 889
890 if (dev_priv->ctx.res_ht_initialized) 890 if (dev_priv->ctx.res_ht_initialized)
891 drm_ht_remove(&dev_priv->ctx.res_ht); 891 drm_ht_remove(&dev_priv->ctx.res_ht);
892 if (dev_priv->ctx.cmd_bounce) 892 vfree(dev_priv->ctx.cmd_bounce);
893 vfree(dev_priv->ctx.cmd_bounce);
894 if (dev_priv->enable_fb) { 893 if (dev_priv->enable_fb) {
895 vmw_fb_close(dev_priv); 894 vmw_fb_close(dev_priv);
896 vmw_kms_restore_vga(dev_priv); 895 vmw_kms_restore_vga(dev_priv);