From patchwork Wed Dec 31 06:55:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 5554411 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6B8949F344 for ; Wed, 31 Dec 2014 06:55:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 89B36201C0 for ; Wed, 31 Dec 2014 06:55:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A784201BB for ; Wed, 31 Dec 2014 06:55:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750757AbaLaGzu (ORCPT ); Wed, 31 Dec 2014 01:55:50 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:36954 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750734AbaLaGzu (ORCPT ); Wed, 31 Dec 2014 01:55:50 -0500 Received: by mail-pa0-f51.google.com with SMTP id ey11so20856003pad.38; Tue, 30 Dec 2014 22:55:49 -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; bh=IFaEL7ShHV0Q4d2USRU9woEOxI8xqpPadxHsH/+Wrlg=; b=CL7cCU0zHCN/CYoTVLDOJaHD7uC0Vs8LklmoQ98LECCqeMPWx+I/DF0AJOL1OHQysp woEybfyn3USbMH5RH63CVhO+lxO8lU8B5WSGfs4TZ8nvnEWVq12cA6F4LLsaoFfM8C12 sXIkll/Iv8764nG1Oj2+vSSzNRyHnTmdT6lWS8gxHYgfGAbWYa0Lx5x8TfmDV5xn8jHv U1GlZ6a7mL6S7GWZSrMGdu2VvWl5qzHLgHOaVe+VH8j7Tlcbsm6XsOugdx/cIUm1Tmjr hwlKo1634SEQrGfPYBcS6FJutHdMDW2f3b/m2C1tDsGzHpzO1bgauWdna8gsKJfPpKQB zpHA== X-Received: by 10.68.57.225 with SMTP id l1mr102738245pbq.87.1420008949585; Tue, 30 Dec 2014 22:55:49 -0800 (PST) Received: from localhost.localdomain ([122.169.164.21]) by mx.google.com with ESMTPSA id vz3sm40462404pab.2.2014.12.30.22.55.46 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Dec 2014 22:55:48 -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: Wed, 31 Dec 2014 12:25:38 +0530 Message-Id: <1420008938-18423-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 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 gx1fb_init_fbinfo() and returnig -ENOMEM if it is NULL. Signed-off-by: Sudip Mukherjee --- drivers/video/fbdev/geode/gx1fb_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/geode/gx1fb_core.c b/drivers/video/fbdev/geode/gx1fb_core.c index 2794ba1..9bee874 100644 --- a/drivers/video/fbdev/geode/gx1fb_core.c +++ b/drivers/video/fbdev/geode/gx1fb_core.c @@ -374,10 +374,8 @@ static int gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id) release_mem_region(gx1_gx_base() + 0x8300, 0x100); } - if (info) { - fb_dealloc_cmap(&info->cmap); - framebuffer_release(info); - } + fb_dealloc_cmap(&info->cmap); + framebuffer_release(info); return ret; }