Skip to content

Commit

Permalink
cxl: Test the correct mmio space before unmapping
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Axtens authored and Michael Ellerman committed Jul 6, 2015
1 parent 27ea2c4 commit 8c00d5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/misc/cxl/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8c00d5c

Please sign in to comment.