All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/ata/pata_mpc52xx.c: add missing kfree
@ 2012-03-10 17:56 ` Julia Lawall
  0 siblings, 0 replies; 18+ messages in thread
From: Julia Lawall @ 2012-03-10 17:56 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: kernel-janitors, Grant Likely, Rob Herring, linux-ide,
	linux-kernel, devicetree-discuss

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>

---
 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;
 }
 


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2012-03-11 10:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-10 17:56 [PATCH] drivers/ata/pata_mpc52xx.c: add missing kfree Julia Lawall
2012-03-10 17:56 ` Julia Lawall
2012-03-10 18:13 ` Wolfram Sang
2012-03-10 18:13   ` Wolfram Sang
2012-03-10 18:32   ` Joe Perches
2012-03-10 18:32     ` Joe Perches
2012-03-10 18:44     ` Wolfram Sang
2012-03-10 18:44       ` Wolfram Sang
2012-03-10 18:44       ` Wolfram Sang
2012-03-10 19:22       ` Joe Perches
2012-03-10 19:22         ` Joe Perches
2012-03-10 18:32 ` walter harms
2012-03-10 18:32   ` walter harms
2012-03-10 21:50   ` Julia Lawall
2012-03-10 21:50     ` Julia Lawall
     [not found] ` <1331402199-8000-1-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
2012-03-11 10:04   ` Sergei Shtylyov
2012-03-11 10:04     ` Sergei Shtylyov
2012-03-11 10:04     ` Sergei Shtylyov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.