From: Jon Mason Date: Sun, 5 Apr 2015 18:57:22 +0000 (-0400) Subject: ntb: iounmap MW reg and vbase in error path X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=2f4eb6a80e57845ef6f3f7d1cdaaec7a6ab480a9;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git 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 --- 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; } }