]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drivers/iommu/msm_iommu_dev.c: fix leak and clean up error paths
authorLibo Chen <clbchenlibo.chen@huawei.com>
Thu, 27 Jun 2013 23:50:56 +0000 (09:50 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:37:12 +0000 (16:37 +1000)
commit1e9ba14dac9488d74cc5c45ce3056292f709d0b9
tree87c21cbad791978122a4bdbc0dc6a669d785b3ad
parent6b33afea3bebeab73c1047ad9518a5f54febf39d
drivers/iommu/msm_iommu_dev.c: fix leak and clean up error paths

Fix two obvious problems:

1. We have registered msm_iommu_driver first, and need unregister it
   when registered msm_iommu_ctx_driver fail

2. We don`t need to kfree drvdata before kzalloc successful.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Acked-by: David Brown <davidb@codeaurora.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/iommu/msm_iommu_dev.c