Skip to content

Commit

Permalink
ntb: iounmap MW reg and vbase in error path
Browse files Browse the repository at this point in the history
The MW regbase and vbase(s) were not being freed if an error occurred
in the vbase allocation loop.  This is corrected by updating the error
path for the allocation loop to err4.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
  • Loading branch information
Jon Mason committed Jun 9, 2015
1 parent d4a4f75 commit 2f4eb6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ntb/ntb_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,7 @@ static int ntb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
dev_warn(&pdev->dev, "Cannot remap BAR %d\n",
MW_TO_BAR(i));
rc = -EIO;
goto err3;
goto err4;
}
}

Expand Down

0 comments on commit 2f4eb6a

Please sign in to comment.