Эх сурвалжийг харах

cxl: Test the correct mmio space before unmapping

Before freeing p2n, test p2n, not p1n.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Daniel Axtens 10 жил өмнө
parent
commit
8c00d5c9d3

+ 1 - 1
drivers/misc/cxl/pci.c

@@ -539,7 +539,7 @@ err:
 
 
 static void cxl_unmap_slice_regs(struct cxl_afu *afu)
 static void cxl_unmap_slice_regs(struct cxl_afu *afu)
 {
 {
-	if (afu->p1n_mmio)
+	if (afu->p2n_mmio)
 		iounmap(afu->p2n_mmio);
 		iounmap(afu->p2n_mmio);
 	if (afu->p1n_mmio)
 	if (afu->p1n_mmio)
 		iounmap(afu->p1n_mmio);
 		iounmap(afu->p1n_mmio);