iommu/amd: Small cleanup in mn_release()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 20 Feb 2015 10:52:01 +0000 (13:52 +0300)
committerJoerg Roedel <jroedel@suse.de>
Wed, 4 Mar 2015 11:58:59 +0000 (12:58 +0100)
"pasid_state->device_state" and "dev_state" are the same, but it's nicer
to use dev_state consistently.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu_v2.c

index 6d5a5c44453bf5fcc29a3cad394929d463405b33..a1cbba9056fdba15b1334bd923714c65957fc20c 100644 (file)
@@ -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);