From patchwork Tue Feb 26 19:46:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Syam Sidhardhan X-Patchwork-Id: 223380 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C85C52C0084 for ; Wed, 27 Feb 2013 06:48:24 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1UAQUe-0007iO-RZ; Tue, 26 Feb 2013 19:47:16 +0000 Received: from mail-pb0-f41.google.com ([209.85.160.41]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1UAQUc-0007ht-Qh for linux-mtd@lists.infradead.org; Tue, 26 Feb 2013 19:47:15 +0000 Received: by mail-pb0-f41.google.com with SMTP id um15so2590465pbc.14 for ; Tue, 26 Feb 2013 11:47:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=jTmDpYthzL6VCthjksTLix+VFVO2SjHXJWYz33rAZaI=; b=CJQO5/450XmTEXO+HgxxlIf+7HZGHxA0+3CLkFPpzSzAJb67ITCLZjRV87IVaneQx/ FaEfeae5aa+hxCAALLVo386Zc16cMGewNT3iaoYw4iqXDat7WVdfdrtdL+pBAVDc5NZz ezt3VIpcUjzKsWUi5BvhZeWi37EtVMJHuYH0DvvKAjFb/SHFuVF99a9NxhG9IhSQv2BG w4dZnIDvU6Y8NHf8PXLrwEiYeUk3vk6r53uxCTnBVf1W7D0ugLOiJ2ay0UoZO7/9HRfr U8bip/JGbxYrSqbEVcZfXSiD9wlBHerIlpNcoH4MB7YanW4SDP5yUw1NllB3pB5mJ4lN NzvA== X-Received: by 10.68.28.194 with SMTP id d2mr24759278pbh.215.1361908032738; Tue, 26 Feb 2013 11:47:12 -0800 (PST) Received: from localhost.localdomain ([27.7.134.34]) by mx.google.com with ESMTPS id gf6sm1862000pbc.24.2013.02.26.11.47.09 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Feb 2013 11:47:11 -0800 (PST) From: Syam Sidhardhan To: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] mtd: maps: Remove redundant NULL check before kfree Date: Wed, 27 Feb 2013 01:16:56 +0530 Message-Id: <1361908016-3110-1-git-send-email-s.syam@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130226_144714_933179_F84D9ADE X-CRM114-Status: UNSURE ( 9.94 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (syamsidhardh[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.41 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: dwmw2@infradead.org, syamsidhardh@gmail.com X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org kfree on NULL pointer is a no-op. Signed-off-by: Syam Sidhardhan --- drivers/mtd/maps/ck804xrom.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/maps/ck804xrom.c b/drivers/mtd/maps/ck804xrom.c index 586a1c7..0455166 100644 --- a/drivers/mtd/maps/ck804xrom.c +++ b/drivers/mtd/maps/ck804xrom.c @@ -308,8 +308,7 @@ static int ck804xrom_init_one(struct pci_dev *pdev, out: /* Free any left over map structures */ - if (map) - kfree(map); + kfree(map); /* See if I have any map structures */ if (list_empty(&window->maps)) {