GPU-DRM-OMAP: Delete unnecessary checks before two function calls

The following functions test whether their argument is NULL and then
return immediately.
* backlight_device_unregister
* drm_gem_object_unreference_unlocked

Thus the test around the calls is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/72ff4670-4f3d-c7ed-4f37-e49f2bbc7aba@users.sourceforge.net
This commit is contained in:
Markus Elfring
2016-07-22 08:28:31 +02:00
committed by Daniel Vetter
parent e8d3ef0278
commit 76e4c327ea
2 changed files with 3 additions and 4 deletions

View File

@@ -115,8 +115,8 @@ static void omap_framebuffer_destroy(struct drm_framebuffer *fb)
for (i = 0; i < n; i++) {
struct plane *plane = &omap_fb->planes[i];
if (plane->bo)
drm_gem_object_unreference_unlocked(plane->bo);
drm_gem_object_unreference_unlocked(plane->bo);
}
kfree(omap_fb);