ntb: iounmap MW reg and vbase in error path
authorJon Mason <jdmason@kudzu.us>
Sun, 5 Apr 2015 18:57:22 +0000 (14:57 -0400)
committerJon Mason <jdmason@kudzu.us>
Tue, 9 Jun 2015 02:38:40 +0000 (22:38 -0400)
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>
drivers/ntb/ntb_hw.c

index cd29b1038c5e3bf6f4a21659343c65584c44b969..b5c8707f4ac77ea92177e281f94bfd83c6ffa167 100644 (file)
@@ -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;
                }
        }