Skip to contentSkip to conversation

drivers/iommu: check actual error on iommu_init

PATCH Applied Jeff Liu 3 participants 3 messages Jun 17, 2014 IOMMU

lore
Share & tools
lore

Jeff Liu

author
#0 lore raw

PATCH 9/24 drivers/iommu: check actual error on iommu_init

From: Jie Liu <[email protected]>

kset_create_and_add() has been fixed to return the actual error code ptr rather than NULL, so update iommu_init() to check the return value via IS_ERR() accordingly.

Cc Joerg Roedel <[email protected]>
---
 drivers/iommu/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/iommu.c +1 -1
index e5555fc..297b5ad 100644
@@ -925,7 +925,7 @@ static int __init iommu_init(void)
 	ida_init(&iommu_group_ida);
 	mutex_init(&iommu_group_mutex);
 
-	BUG_ON(!iommu_group_kset);
+	BUG_ON(IS_ERR(iommu_group_kset));
 
 	return 0;
 }
Signature · 1 line
1.8.3.2
#2 lore raw
Quoted 11 lines · Joerg Roedel
Quoted 8 lines · Jeff Liu

From: Jie Liu <[email protected]>

kset_create_and_add() has been fixed to return the actual error code ptr rather than NULL, so update iommu_init() to check the return value via IS_ERR() accordingly.

Cc Joerg Roedel <[email protected]>

Nope, please do not take this patch, it is not needed and as the kset call is not changing, it will be incorrect.

thanks,

greg k-h