Commit 76e4c327 authored by Markus Elfring's avatar Markus Elfring Committed by Daniel Vetter

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/72ff4670-4f3d-c7ed-4f37-e49f2bbc7aba@users.sourceforge.net
parent e8d3ef02
...@@ -1284,7 +1284,6 @@ static int dsicm_probe(struct platform_device *pdev) ...@@ -1284,7 +1284,6 @@ static int dsicm_probe(struct platform_device *pdev)
return 0; return 0;
err_sysfs_create: err_sysfs_create:
if (bldev != NULL)
backlight_device_unregister(bldev); backlight_device_unregister(bldev);
err_bl: err_bl:
destroy_workqueue(ddata->workqueue); destroy_workqueue(ddata->workqueue);
......
...@@ -115,7 +115,7 @@ static void omap_framebuffer_destroy(struct drm_framebuffer *fb) ...@@ -115,7 +115,7 @@ static void omap_framebuffer_destroy(struct drm_framebuffer *fb)
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
struct plane *plane = &omap_fb->planes[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);
} }
......
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