All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] msm: iommu: add missing platform_device_unregister() in err case
@ 2013-05-05 10:06 Libo Chen
  0 siblings, 0 replies; only message in thread
From: Libo Chen @ 2013-05-05 10:06 UTC (permalink / raw)
  To: davidb, ohad, joerg.roedel, torvalds, akpm
  Cc: linux-kernel, lizefan, libo.chen

From: libo.chen@huawei.com

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

Signed-off-by: Libo Chen <libo.chen@huawei.com>
---
 drivers/iommu/msm_iommu_dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/msm_iommu_dev.c b/drivers/iommu/msm_iommu_dev.c
index 8e8fb07..4351a2d 100644
--- a/drivers/iommu/msm_iommu_dev.c
+++ b/drivers/iommu/msm_iommu_dev.c
@@ -401,6 +401,7 @@ static int __init msm_iommu_driver_init(void)

 	ret = platform_driver_register(&msm_iommu_ctx_driver);
 	if (ret != 0) {
+		platform_driver_unregister(&msm_iommu_driver);
 		pr_err("Failed to register IOMMU context driver\n");
 		goto error;
 	}
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-05 10:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-05 10:06 [PATCH 1/2] msm: iommu: add missing platform_device_unregister() in err case Libo Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.