Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c00d5c9 authored by Daniel Axtens's avatar Daniel Axtens Committed by Michael Ellerman
Browse files

cxl: Test the correct mmio space before unmapping



Before freeing p2n, test p2n, not p1n.

Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
Acked-by: default avatarIan Munsie <imunsie@au1.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 27ea2c42
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -539,7 +539,7 @@ static int cxl_map_slice_regs(struct cxl_afu *afu, struct cxl *adapter, struct p

static void cxl_unmap_slice_regs(struct cxl_afu *afu)
{
	if (afu->p1n_mmio)
	if (afu->p2n_mmio)
		iounmap(afu->p2n_mmio);
	if (afu->p1n_mmio)
		iounmap(afu->p1n_mmio);