dmaengine: pch_dma: fix memory leak on failure path in pch_dma_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 10 Apr 2015 22:28:41 +0000 (01:28 +0300)
committerVinod Koul <vinod.koul@intel.com>
Fri, 17 Apr 2015 18:11:46 +0000 (23:41 +0530)
Memory allocated for pch_dma is not deallocated in case of failure
in pch_dma_probe().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/pch_dma.c

index 35c143cb88da1c676d47f714f3fed146010083fc..b859792dde955bc7acdc11eea9686009a0ddfd1c 100644 (file)
@@ -949,6 +949,7 @@ err_free_res:
 err_disable_pdev:
        pci_disable_device(pdev);
 err_free_mem:
+       kfree(pd);
        return err;
 }
 
This page took 0.026023 seconds and 5 git commands to generate.