summaryrefslogtreecommitdiff
path: root/drivers/iommu/ipmmu-vmsa.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2018-12-12 00:24:57 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-12-12 00:24:57 +0300
commit28ab1bb0e8f031dd7dd3462ff8f6b2e93fc77e7f (patch)
tree3c0d2177d9bfc513c2d06c1efb5ab62c74fd1953 /drivers/iommu/ipmmu-vmsa.c
parentb874155a5fa450bf5e4b5303cbfff05958805bf8 (diff)
parent40e020c129cfc991e8ab4736d2665351ffd1468d (diff)
downloadlinux-28ab1bb0e8f031dd7dd3462ff8f6b2e93fc77e7f.tar.xz
Merge tag 'v4.20-rc6' into rdma.git for-next
For dependencies in following patches.
Diffstat (limited to 'drivers/iommu/ipmmu-vmsa.c')
-rw-r--r--drivers/iommu/ipmmu-vmsa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index b98a03189580..ddf3a492e1d5 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -498,6 +498,9 @@ static int ipmmu_domain_init_context(struct ipmmu_vmsa_domain *domain)
static void ipmmu_domain_destroy_context(struct ipmmu_vmsa_domain *domain)
{
+ if (!domain->mmu)
+ return;
+
/*
* Disable the context. Flush the TLB as required when modifying the
* context registers.