Skip to content

Commit cd901e9

Browse files
musamaanjumjoergroedel
authored andcommitted
iommu/vt-d: Remove unneeded validity check on dev
dev_iommu_priv_get() is being used at the top of this function which dereferences dev. Dev cannot be NULL after this. Remove the validity check on dev and simplify the code. Signed-off-by: Muhammad Usama Anjum <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lu Baolu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent b8397a8 commit cd901e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/intel/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2501,7 +2501,7 @@ static struct dmar_domain *dmar_insert_one_dev_info(struct intel_iommu *iommu,
25012501
}
25022502
}
25032503

2504-
if (dev && domain_context_mapping(domain, dev)) {
2504+
if (domain_context_mapping(domain, dev)) {
25052505
dev_err(dev, "Domain context map failed\n");
25062506
dmar_remove_one_dev_info(dev);
25072507
return NULL;

0 commit comments

Comments
 (0)