Commit 264f7d67 authored by Markus Elfring's avatar Markus Elfring Committed by Rob Clark

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 4e0cd681
......@@ -190,8 +190,7 @@ static int msm_fbdev_create(struct drm_fb_helper *helper,
fail:
if (ret) {
if (fbi)
framebuffer_release(fbi);
framebuffer_release(fbi);
if (fb) {
drm_framebuffer_unregister_private(fb);
drm_framebuffer_remove(fb);
......
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment