summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2014-11-19 17:50:19 +0100
committerDave Airlie <airlied@redhat.com>2014-11-21 12:16:40 +1000
commita3a1a6674f7fd6c0f7e673c4fc1b1aea3d8fce53 (patch)
tree829004d1f36690692865ef1dbede402157d81db0 /drivers/gpu/drm/vmwgfx
parente9196d238597da0189b035f37c473c411275b0dd (diff)
downloadop-kernel-dev-a3a1a6674f7fd6c0f7e673c4fc1b1aea3d8fce53.zip
op-kernel-dev-a3a1a6674f7fd6c0f7e673c4fc1b1aea3d8fce53.tar.gz
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>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx')
-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 25f3c25..db76218 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)
if (dev_priv->ctx.res_ht_initialized)
drm_ht_remove(&dev_priv->ctx.res_ht);
- if (dev_priv->ctx.cmd_bounce)
- vfree(dev_priv->ctx.cmd_bounce);
+ vfree(dev_priv->ctx.cmd_bounce);
if (dev_priv->enable_fb) {
vmw_fb_close(dev_priv);
vmw_kms_restore_vga(dev_priv);
OpenPOWER on IntegriCloud