ARM: OMAP: dma: Remove the erroneous freeing of platform data
authorRajendra Nayak <rnayak@ti.com>
Thu, 13 Jun 2013 14:17:11 +0000 (19:47 +0530)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 7 Jun 2015 20:27:32 +0000 (23:27 +0300)
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 <rnayak@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/dma.c

index e3e3559..c47e64b 100644 (file)
@@ -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;
 }