devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <Julia.Lawall@lip6.fr>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: kernel-janitors@vger.kernel.org,
	Grant Likely <grant.likely@secretlab.ca>,
	Rob Herring <rob.herring@calxeda.com>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org, w.sang@pengutronix.de
Subject: [PATCH] drivers/ata/pata_mpc52xx.c: drop unneeded devm cleanup functions
Date: Sat, 10 Mar 2012 22:35:52 +0100	[thread overview]
Message-ID: <1331415352-10260-1-git-send-email-Julia.Lawall@lip6.fr> (raw)

From: Julia Lawall <Julia.Lawall@lip6.fr>

There is no need to call the devm cleanup functions on failure of a probe
or remove function.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>

---
Changed subject.  Included Wolfram's ACK.

 drivers/ata/pata_mpc52xx.c |   11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index 00748ae..1f02008 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -806,17 +806,12 @@ mpc52xx_ata_probe(struct platform_device *op)
 	return 0;
 
  err:
-	devm_release_mem_region(&op->dev, res_mem.start, sizeof(*ata_regs));
 	if (ata_irq)
 		irq_dispose_mapping(ata_irq);
 	if (task_irq)
 		irq_dispose_mapping(task_irq);
 	if (dmatsk)
 		bcom_ata_release(dmatsk);
-	if (ata_regs)
-		devm_iounmap(&op->dev, ata_regs);
-	if (priv)
-		devm_kfree(&op->dev, priv);
 	return rv;
 }
 
@@ -835,12 +830,6 @@ mpc52xx_ata_remove(struct platform_device *op)
 	bcom_ata_release(priv->dmatsk);
 	irq_dispose_mapping(priv->ata_irq);
 
-	/* Clear up IO allocations */
-	devm_iounmap(&op->dev, priv->ata_regs);
-	devm_release_mem_region(&op->dev, priv->ata_regs_pa,
-				sizeof(*priv->ata_regs));
-	devm_kfree(&op->dev, priv);
-
 	return 0;
 }
 

             reply	other threads:[~2012-03-10 21:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-10 21:35 Julia Lawall [this message]
2012-03-18 20:58 ` [PATCH] drivers/ata/pata_mpc52xx.c: drop unneeded devm cleanup functions Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331415352-10260-1-git-send-email-Julia.Lawall@lip6.fr \
    --to=julia.lawall@lip6.fr \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=jgarzik@pobox.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=w.sang@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).