diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-11-19 19:50:19 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-11-21 05:16:40 +0300 |
commit | a3a1a6674f7fd6c0f7e673c4fc1b1aea3d8fce53 (patch) | |
tree | 829004d1f36690692865ef1dbede402157d81db0 /drivers/gpu/drm/vmwgfx | |
parent | e9196d238597da0189b035f37c473c411275b0dd (diff) | |
download | linux-a3a1a6674f7fd6c0f7e673c4fc1b1aea3d8fce53.tar.xz |
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.c | 3 |
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) 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); |