From patchwork Wed Sep 25 07:40:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 277732 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from casper.infradead.org (unknown [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9BCDB2C00C2 for ; Wed, 25 Sep 2013 17:41:18 +1000 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VOjic-0005l6-GA; Wed, 25 Sep 2013 07:41:06 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VOjia-0006wb-RT; Wed, 25 Sep 2013 07:41:04 +0000 Received: from mail-bk0-x231.google.com ([2a00:1450:4008:c01::231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VOjiW-0006va-Sg for linux-mtd@lists.infradead.org; Wed, 25 Sep 2013 07:41:03 +0000 Received: by mail-bk0-f49.google.com with SMTP id r7so2077738bkg.22 for ; Wed, 25 Sep 2013 00:40:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=amVqNVwKHO00mUQ3NjCNxHRRy/1fmpU4sZf2b+YMxyQ=; b=LdRtssLFNTUGtAEfrsuuyIwXbpYe5ZaL8XE/7IdRJmcrgPpGJk0HmUPivOCZujGW0G JyrJtb9Pyhf3AZiHriOx9iECIkvg7VMIuJbk3npugGYqWeZi4PmSrbB0HtNRo/n6IW2G nkqaLdB6j9oFzFjUUVZJsyNgYyKPeB3qAbJ+CQkxeLsga59Kzs5/sHEcdwMs4HZwaHAL vscqSHce2zY7PToAkKbDQucJsacXGUk4kfqBx7FlplbKnJ4Pe1eM8uMbWtVmTK4K1/Lx aoTe+VSU0cjcIf7OppVfex3bEsyX06Csu0X18WwcGz9fCOa4z22n3yF+gi55rvDaBHTC giVg== MIME-Version: 1.0 X-Received: by 10.204.102.136 with SMTP id g8mr319412bko.34.1380094838323; Wed, 25 Sep 2013 00:40:38 -0700 (PDT) Received: by 10.205.13.74 with HTTP; Wed, 25 Sep 2013 00:40:38 -0700 (PDT) Date: Wed, 25 Sep 2013 15:40:38 +0800 Message-ID: Subject: [PATCH] mtd: mpc5121_nfc: drop devm_free_irq of devm_ allocated irq From: Wei Yongjun To: dwmw2@infradead.org, grant.likely@linaro.org, rob.herring@calxeda.com, artem.bityutskiy@linux.intel.com, wfp5p@virginia.edu, shijie8@gmail.com, agust@denx.de, gsi@denx.de X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130925_034101_050593_0A77D9E4 X-CRM114-Status: UNSURE ( 8.52 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (weiyj.lk[at]gmail.com) -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: yongjun_wei@trendmicro.com.cn, linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Wei Yongjun The devm_request_irq function allocates irq that is released when a driver detaches. Thus, there is no reason to explicitly call devm_free_irq in probe or remove functions. Signed-off-by: Wei Yongjun --- drivers/mtd/nand/mpc5121_nfc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c index 3c60a00..7df37f0 100644 --- a/drivers/mtd/nand/mpc5121_nfc.c +++ b/drivers/mtd/nand/mpc5121_nfc.c @@ -784,7 +784,6 @@ static int mpc5121_nfc_probe(struct platform_device *op) /* Detect NAND chips */ if (nand_scan(mtd, be32_to_cpup(chips_no))) { dev_err(dev, "NAND Flash not found !\n"); - devm_free_irq(dev, prv->irq, mtd); retval = -ENXIO; goto error; } @@ -809,7 +808,6 @@ static int mpc5121_nfc_probe(struct platform_device *op) default: dev_err(dev, "Unsupported NAND flash!\n"); - devm_free_irq(dev, prv->irq, mtd); retval = -ENXIO; goto error; } @@ -820,7 +818,6 @@ static int mpc5121_nfc_probe(struct platform_device *op) retval = mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0); if (retval) { dev_err(dev, "Error adding MTD device!\n"); - devm_free_irq(dev, prv->irq, mtd); goto error; } @@ -838,7 +835,6 @@ static int mpc5121_nfc_remove(struct platform_device *op) struct mpc5121_nfc_prv *prv = chip->priv; nand_release(mtd); - devm_free_irq(dev, prv->irq, mtd); mpc5121_nfc_free(dev, mtd); return 0;