drm/fb-helper: Remove unnecessary list empty check in drm_fb_helper_debug_enter()
authorLiu Ying <Ying.Liu@freescale.com>
Thu, 19 Jun 2014 08:01:44 +0000 (16:01 +0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 19 Jun 2014 08:13:46 +0000 (10:13 +0200)
The following list empty check is unnecessary because we would still do nothing
real and return 'val' if my_list is empty.

if (list_empty(&my_list))
return val;

list_for_each_entry(pos, &my_list, member) {
...
}

return val;

This patch removes the unnecessary check in drm_fb_helper_debug_enter().

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_fb_helper.c

index 7ff98063925fd7a85ca8c5f9fb810beb346d2b69..5aab5ab8b584e2447ae4a3255d535eab5f8d45c3 100644 (file)
@@ -199,9 +199,6 @@ int drm_fb_helper_debug_enter(struct fb_info *info)
        struct drm_crtc_helper_funcs *funcs;
        int i;
 
-       if (list_empty(&kernel_fb_helper_list))
-               return false;
-
        list_for_each_entry(helper, &kernel_fb_helper_list, kernel_fb_list) {
                for (i = 0; i < helper->crtc_count; i++) {
                        struct drm_mode_set *mode_set =