summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/usnic
diff options
context:
space:
mode:
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>2016-08-10 17:45:01 +0200
committerDoug Ledford <dledford@redhat.com>2016-08-22 14:31:43 -0400
commit86cd747c6dd6cdbc825e36ad5f0029f3c5a37776 (patch)
tree607e3bceedbb6f5b6f11ca857d73cb0f725b1d7d /drivers/infiniband/hw/usnic
parent57bb562ad4651453c9f20d506a65e46e4d11042f (diff)
IB/usnic: Fix error return code
If 'pci_register_driver' fails, we return 'err' which is known to be 0. Return the error instead. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/usnic')
-rw-r--r--drivers/infiniband/hw/usnic/usnic_ib_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_main.c b/drivers/infiniband/hw/usnic/usnic_ib_main.c
index c229b9f4a52d..0a89a955550b 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_main.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_main.c
@@ -664,7 +664,8 @@ static int __init usnic_ib_init(void)
return err;
}
- if (pci_register_driver(&usnic_ib_pci_driver)) {
+ err = pci_register_driver(&usnic_ib_pci_driver);
+ if (err) {
usnic_err("Unable to register with PCI\n");
goto out_umem_fini;
}