diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-11-25 14:30:28 +0100 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2014-12-17 16:59:49 +0100 |
commit | 264f7d673fad394d8ed6b17fa9c16e2e62fa0c4e (patch) | |
tree | e5b22d679389552e587fcfdbde52131fce7ac102 /drivers/gpu/drm/msm | |
parent | drm: sti: fix module compilation issue (diff) | |
download | linux-264f7d673fad394d8ed6b17fa9c16e2e62fa0c4e.tar.xz linux-264f7d673fad394d8ed6b17fa9c16e2e62fa0c4e.zip |
drm/msm: Deletion of unnecessary checks before two function calls
The functions framebuffer_release() and vunmap() perform 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 <treding@nvidia.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm')
-rw-r--r-- | drivers/gpu/drm/msm/msm_fbdev.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c index 94d55e526b4e..1f3af13ccede 100644 --- a/drivers/gpu/drm/msm/msm_fbdev.c +++ b/drivers/gpu/drm/msm/msm_fbdev.c @@ -190,8 +190,7 @@ fail_unlock: fail: if (ret) { - if (fbi) - framebuffer_release(fbi); + framebuffer_release(fbi); if (fb) { drm_framebuffer_unregister_private(fb); drm_framebuffer_remove(fb); diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 4a6f0e49d5b5..49dea4fb55ac 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -535,8 +535,7 @@ void msm_gem_free_object(struct drm_gem_object *obj) drm_free_large(msm_obj->pages); } else { - if (msm_obj->vaddr) - vunmap(msm_obj->vaddr); + vunmap(msm_obj->vaddr); put_pages(obj); } |