From c4989452317a1112bd1ba887a30eff719ce8f1ff Mon Sep 17 00:00:00 2001 From: Rajendra Nayak Date: Thu, 13 Jun 2013 19:47:11 +0530 Subject: [PATCH] ARM: OMAP: dma: Remove the erroneous freeing of platform data Given p = pdev->dev.platform_data; and d = p->dma_attr; the freeing of either one of these by the driver seems just plain wrong. Get rid of them in the .probe failure path as well as the .remove. Signed-off-by: Rajendra Nayak Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/dma.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index e3e3559eadac..c47e64ba9fc7 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -2107,8 +2107,6 @@ exit_dma_irq_fail: } exit_dma_lch_fail: - kfree(p); - kfree(d); kfree(dma_chan); return ret; } @@ -2129,8 +2127,6 @@ static int __devexit omap_system_dma_remove(struct platform_device *pdev) free_irq(dma_irq, (void *)(irq_rel + 1)); } } - kfree(p); - kfree(d); kfree(dma_chan); return 0; } -- 2.39.2