From mboxrd@z Thu Jan 1 00:00:00 1970 From: Liu Ying Subject: [PATCH] drm/fb-helper: Remove unnecessary list empty check in drm_fb_helper_debug_enter() Date: Thu, 19 Jun 2014 16:01:44 +0800 Message-ID: <1403164904-7112-1-git-send-email-Ying.Liu@freescale.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2lp0211.outbound.protection.outlook.com [207.46.163.211]) by gabe.freedesktop.org (Postfix) with ESMTP id A3AA76E82C for ; Thu, 19 Jun 2014 00:59:08 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org 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 --- drivers/gpu/drm/drm_fb_helper.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index d5d8cea..eb77a2f 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -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 = -- 1.7.9.5