From: Libo Chen Date: Mon, 8 Jul 2013 22:59:47 +0000 (-0700) Subject: drivers/iommu/msm_iommu_dev.c: fix leak and clean up error paths X-Git-Tag: v3.11-rc1~67^2~106 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34e3a58c66aafd90cc16c061569fbefc3ff451e9;p=pandora-kernel.git 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 was successful. [akpm@linux-foundation.org: remove now-unneeded initialization of ctx_drvdata, remove unneeded braces] Signed-off-by: Libo Chen Acked-by: David Brown Cc: David Woodhouse Cc: James Hogan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed