diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2017-10-11 14:14:36 +0530 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-10-31 15:33:46 -0500 |
commit | 80068c93688f6143100859c4856f895801c1a1d9 (patch) | |
tree | 7272488bb19d3eaaeb824be7ca2dcf811a87d2fa /drivers/misc | |
parent | a2db2663bd72053ca1e4b4f36dfd31ba233c3a65 (diff) | |
download | linux-stable-80068c93688f6143100859c4856f895801c1a1d9.tar.gz linux-stable-80068c93688f6143100859c4856f895801c1a1d9.tar.bz2 linux-stable-80068c93688f6143100859c4856f895801c1a1d9.zip |
misc: pci_endpoint_test: Fix failure path return values in probe
Return value of pci_endpoint_test_probe is not set properly in a couple of
failure cases. Fix it here.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/pci_endpoint_test.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c index d40a34f594c7..5e7af21686d6 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -542,6 +542,7 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev, test->base = test->bar[test_reg_bar]; if (!test->base) { + err = -ENOMEM; dev_err(dev, "Cannot perform PCI test without BAR%d\n", test_reg_bar); goto err_iounmap; @@ -551,6 +552,7 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev, id = ida_simple_get(&pci_endpoint_test_ida, 0, 0, GFP_KERNEL); if (id < 0) { + err = id; dev_err(dev, "unable to get id\n"); goto err_iounmap; } |