From 2f4eb6a80e57845ef6f3f7d1cdaaec7a6ab480a9 Mon Sep 17 00:00:00 2001 From: Jon Mason Date: Sun, 5 Apr 2015 14:57:22 -0400 Subject: ntb: iounmap MW reg and vbase in error path 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 Signed-off-by: Jon Mason --- drivers/ntb/ntb_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/ntb') diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c index cd29b1038c5e..b5c8707f4ac7 100644 --- a/drivers/ntb/ntb_hw.c +++ b/drivers/ntb/ntb_hw.c @@ -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; } } -- cgit v1.2.3