]> 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>
Wed, 19 Jun 2013 00:05:31 +0000 (10:05 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:12:44 +0000 (17:12 +1000)
commit638c477d44e4640dbdbae923151631b0708ee306
tree17382a19c0f22fd622109613afce0fe86db755a5
parentb3f1e2986ba0c240e0bf1856fc0ab8a7b8f0ec2b
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