iommu/vt-d: Use memunmap to free memremap
authorPan Bian <bianpan2016@163.com>
Wed, 21 Nov 2018 09:53:47 +0000 (17:53 +0800)
committerJoerg Roedel <jroedel@suse.de>
Thu, 22 Nov 2018 16:02:21 +0000 (17:02 +0100)
memunmap() should be used to free the return of memremap(), not
iounmap().

Fixes: dfddb969edf0 ('iommu/vt-d: Switch from ioremap_cache to memremap')
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c

index f3ccf025108b4c377f2f9bc6de80e8222b817a01..41a4b8808802b8bcc30106c37b748eb3507943c0 100644 (file)
@@ -3075,7 +3075,7 @@ static int copy_context_table(struct intel_iommu *iommu,
                        }
 
                        if (old_ce)
                        }
 
                        if (old_ce)
-                               iounmap(old_ce);
+                               memunmap(old_ce);
 
                        ret = 0;
                        if (devfn < 0x80)
 
                        ret = 0;
                        if (devfn < 0x80)