From patchwork Tue Jan 6 12:45:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 5573481 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 29543BF6C3 for ; Tue, 6 Jan 2015 12:45:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4F13E20117 for ; Tue, 6 Jan 2015 12:45:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6DCBF200CA for ; Tue, 6 Jan 2015 12:45:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754650AbbAFMpU (ORCPT ); Tue, 6 Jan 2015 07:45:20 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:33768 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751713AbbAFMpT (ORCPT ); Tue, 6 Jan 2015 07:45:19 -0500 Received: by mail-pa0-f49.google.com with SMTP id eu11so30508651pac.8; Tue, 06 Jan 2015 04:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TV5lP1J8aV7rA5VKBowfhMipI0EWrWBZMzeqY9Ut8ew=; b=qv53bwOdfWs/8UfbKMLonQs4pyIpfKTrFaK6KmBkgjPv0qPK+gUeeTVxwNHMAa0fui Sm8y1s5XYhsLqk66xc4sLRvSKeAhLJhK0kKyYAc2n5QIIsspHzR2StYETJt/UbNrdLin M1ut3vo4ZPvHmjZpI/5LWUCB6tzTAg47pw3277K88migyM96LaeZO3zUCeC5qfzFPmSq 8DYiC9QOViePlGnuru05oeofm0IMBPll4lo01+0WMNWBSQZeWpSQajjRW7+mRjsQu/Dq CDNigIywNjHxUJI5nB0bemndVwiHr/5J8YaV3iZL18ThHcAj49Bvbs+RR2LL486Kcisc CpSQ== X-Received: by 10.66.250.198 with SMTP id ze6mr107392205pac.99.1420548318652; Tue, 06 Jan 2015 04:45:18 -0800 (PST) Received: from localhost.localdomain ([122.169.180.146]) by mx.google.com with ESMTPSA id c9sm56968331pdj.52.2015.01.06.04.45.15 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 Jan 2015 04:45:18 -0800 (PST) From: Sudip Mukherjee To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Sudip Mukherjee , linux-geode@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] fbdev: geocode: remove unneeded NULL check Date: Tue, 6 Jan 2015 18:15:02 +0530 Message-Id: <1420548302-11489-2-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1420548302-11489-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1420548302-11489-1-git-send-email-sudipm.mukherjee@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP the check for info is not required as we are checking it immediately after gxfb_init_fbinfo() and lxfb_init_fbinfo() and returnig -ENOMEM if it is NULL. Signed-off-by: Sudip Mukherjee --- Hi Tomi, This patch is similar to my last patch which you have already queued for 3.20. if you can revert that then i can send you a single patch with all these three changes together. drivers/video/fbdev/geode/gxfb_core.c | 6 ++---- drivers/video/fbdev/geode/lxfb_core.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/video/fbdev/geode/gxfb_core.c b/drivers/video/fbdev/geode/gxfb_core.c index 1790f14..124d7c7 100644 --- a/drivers/video/fbdev/geode/gxfb_core.c +++ b/drivers/video/fbdev/geode/gxfb_core.c @@ -444,10 +444,8 @@ static int gxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id) pci_release_region(pdev, 1); } - if (info) { - fb_dealloc_cmap(&info->cmap); - framebuffer_release(info); - } + fb_dealloc_cmap(&info->cmap); + framebuffer_release(info); return ret; } diff --git a/drivers/video/fbdev/geode/lxfb_core.c b/drivers/video/fbdev/geode/lxfb_core.c index 9e1d19d..138da6c 100644 --- a/drivers/video/fbdev/geode/lxfb_core.c +++ b/drivers/video/fbdev/geode/lxfb_core.c @@ -577,10 +577,8 @@ err: pci_release_region(pdev, 3); } - if (info) { - fb_dealloc_cmap(&info->cmap); - framebuffer_release(info); - } + fb_dealloc_cmap(&info->cmap); + framebuffer_release(info); return ret; }