From: Daniel Axtens Date: Thu, 2 Jul 2015 05:55:21 +0000 (+1000) Subject: cxl: Test the correct mmio space before unmapping X-Git-Tag: v4.9.8~3928^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8c00d5c9d3e7452658dda55024485d52919ebfdd;p=platform%2Fkernel%2Flinux-rpi3.git cxl: Test the correct mmio space before unmapping Before freeing p2n, test p2n, not p1n. Signed-off-by: Daniel Axtens Acked-by: Ian Munsie Signed-off-by: Michael Ellerman --- diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index c68ef58..32ad097 100644 --- a/drivers/misc/cxl/pci.c +++ b/drivers/misc/cxl/pci.c @@ -539,7 +539,7 @@ err: 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);