Skip to contentSkip to conversation

iommu/amd: small cleanup in mn_release()

PATCH Applied Dan Carpenter 2 participants 2 messages Feb 20, 2015 – Mar 3, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/amd: small cleanup in mn_release()

"pasid_state->device_state" and "dev_state" are the same, but it's nicer to use dev_state consistently.

drivers/iommu/amd_iommu_v2.c +1 -1
index 6d5a5c4..a1cbba9 100644
@@ -417,7 +417,7 @@ static void mn_release(struct mmu_notifier *mn, struct mm_struct *mm)
 	dev_state      = pasid_state->device_state;
 	run_inv_ctx_cb = !pasid_state->invalid;
 
-	if (run_inv_ctx_cb && pasid_state->device_state->inv_ctx_cb)
+	if (run_inv_ctx_cb && dev_state->inv_ctx_cb)
 		dev_state->inv_ctx_cb(dev_state->pdev, pasid_state->pasid);
 
 	unbind_pasid(pasid_state);