Skip to content

Commit

Permalink
dmaengine: pch_dma: fix memory leak on failure path in pch_dma_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexey Khoroshilov authored and Vinod Koul committed Apr 17, 2015
1 parent 0434a23 commit 12d7b7a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/dma/pch_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,7 @@ static int pch_dma_probe(struct pci_dev *pdev,
err_disable_pdev:
pci_disable_device(pdev);
err_free_mem:
kfree(pd);
return err;
}

Expand Down

0 comments on commit 12d7b7a

Please sign in to comment.