dma: intel_mid_dma: fix double free on mid_setup_dma error path
authorAxel Lin <axel.lin@gmail.com>
Tue, 2 Nov 2010 01:52:17 +0000 (09:52 +0800)
committerDan Williams <dan.j.williams@intel.com>
Fri, 3 Dec 2010 09:46:07 +0000 (01:46 -0800)
commit51a1efe2e84493439db32c07471e835c752a7923
tree7608eba539917e5b666c9f67a63aa82449aeb43e
parentcbeae41888bddb2d8c23db281de5f38f4be6a9bb
dma: intel_mid_dma: fix double free on mid_setup_dma error path

We should not call kfree(dma) in mid_setup_dma error path because
the memory is allocated in intel_mid_dma_probe and will be freed
in intel_mid_dma_probe error path if mid_setup_dma return error.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/intel_mid_dma.c