dma: of-dma.c: fix memory leakage
authorCong Ding <dinggnu@gmail.com>
Thu, 14 Feb 2013 10:16:10 +0000 (11:16 +0100)
committerVinod Koul <vinod.koul@intel.com>
Thu, 14 Feb 2013 13:41:46 +0000 (19:11 +0530)
The memory allocated to ofdma might be a leakage when error occurs.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/of-dma.c

index 59631b2c4666115de2b19febf7c0bd0a77d9df4f..583e50e3d47cb6ac1c4fafd9f3fe50882bc8fe74 100644 (file)
@@ -107,6 +107,7 @@ int of_dma_controller_register(struct device_node *np,
        if (!nbcells) {
                pr_err("%s: #dma-cells property is missing or invalid\n",
                       __func__);
+               kfree(ofdma);
                return -EINVAL;
        }
 
This page took 0.024722 seconds and 5 git commands to generate.