Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6598559imu; Sun, 2 Dec 2018 22:44:22 -0800 (PST) X-Google-Smtp-Source: AFSGD/XsQ1JFc53Ejm73q6X00td4oY4py75JGTZHgP8ECINpbEIbw9TwW2Sxmhe0Ua158027dI2i X-Received: by 2002:a63:2406:: with SMTP id k6mr11872935pgk.229.1543819462678; Sun, 02 Dec 2018 22:44:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543819462; cv=none; d=google.com; s=arc-20160816; b=Xph32Lzhs13LrKkKbbNTN4cANfYxGQ+cuFCKuY18HlHcrrNMdFVGY9iL8t36AC7Bod q73YojZ5YMyb9NQ+U/Tg4QhJoKPIn8bAoRuM6zxOyi3b66HDb1vKh+j8PlSBS6B0psy/ VULORsGr6FRsHlKI1E2s1auUElOdMimIO1IJUFiE8nQnLtNBuGhbIJvrM0IyLssbiVHz q2w2RLv0z5YQDJl+yIZ7x7fBofMOUBFJaD4I7mgfWKdtblQREqtZYQmxvj1F+CiHv/po Fzq3Pob3Q0kLY9zRa+WQ3XFFOiZQlqokwuhxPmB9jOzzpu/Z09EbqE8jrQJZtzpN6YBq xOvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=bC/EBeB9aTlJIrChTwyXDeQau3sCg1T8+lqB95XZBMI=; b=0bT0HM032GF29shMDfEMg55gz10ulh14o0NlZDwBSq51KZfccSykaM3f7mLyfeTNYU 0T7IItn/AjclmcY3tCc+33qsimnx2X5rQAB7L4HQBGK/45JkMrEQvh+vKiBV59dOQGZ1 lOatIIqatbAo0eJN0a8xDsCxttczM4hW7eWaADySUfvQeWmXbzV11EPsErXAAgUAJ0DY Bx2BHNuhPjPTtGeqymerfjOmlKNeX3DySwQyQLR3Wnv2ZFPwJS14KHHH28w/4EemeMyp cs893IJIfHkL4oY8ciC7Ev3wLc4pE/D8KopdV9xSwkCRRSIwZEjwAPrwCSjLr76z3wLB aSLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l94si7001520plb.416.2018.12.02.22.44.07; Sun, 02 Dec 2018 22:44:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725920AbeLCGna (ORCPT + 99 others); Mon, 3 Dec 2018 01:43:30 -0500 Received: from mxhk.zte.com.cn ([63.217.80.70]:16840 "EHLO mxhk.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725825AbeLCGn3 (ORCPT ); Mon, 3 Dec 2018 01:43:29 -0500 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id A7A444E04F7F2AD5C12B; Mon, 3 Dec 2018 14:43:26 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id wB36hNvC071283; Mon, 3 Dec 2018 14:43:23 +0800 (GMT-8) (envelope-from wen.yang99@zte.com.cn) Received: from LIN-A6CB96A0603.zte.intra ([10.90.106.118]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2018120314432881-14390111 ; Mon, 3 Dec 2018 14:43:28 +0800 From: Wen Yang To: Timur Tabi , Bartlomiej Zolnierkiewicz Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, zhong.weidong@zte.com.cn, Wen Yang Subject: [PATCH] fbdev: fsl-diu: remove redundant null check on cmap Date: Mon, 3 Dec 2018 14:43:17 +0800 Message-Id: <20181203064317.57054-1-wen.yang99@zte.com.cn> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2018-12-03 14:43:29, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2018-12-03 14:43:23 Content-Transfer-Encoding: quoted-printable X-MAIL: mse01.zte.com.cn wB36hNvC071283 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The null check on &info->cmap is redundant since cmap is a struct inside fb=5Finfo and can never be null, so the check is always true. we may remove it. Signed-off-by: Wen Yang CC: Timur Tabi CC: Bartlomiej Zolnierkiewicz CC: linux-fbdev@vger.kernel.org CC: dri-devel@lists.freedesktop.org CC: linux-kernel@vger.kernel.org --- drivers/video/fbdev/fsl-diu-fb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu= -fb.c index 332a56b6811f..9a5451ba4d44 100644 --- a/drivers/video/fbdev/fsl-diu-fb.c +++ b/drivers/video/fbdev/fsl-diu-fb.c @@ -1575,8 +1575,7 @@ static void uninstall=5Ffb(struct fb=5Finfo *info) =20 unregister=5Fframebuffer(info); unmap=5Fvideo=5Fmemory(info); - if (&info->cmap) - fb=5Fdealloc=5Fcmap(&info->cmap); + fb=5Fdealloc=5Fcmap(&info->cmap); =20 mfbi->registered =3D 0; } --=20 2.19.1