Commit 86cd747c authored by Christophe Jaillet's avatar Christophe Jaillet Committed by Doug Ledford

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 57bb562a
...@@ -664,7 +664,8 @@ static int __init usnic_ib_init(void) ...@@ -664,7 +664,8 @@ static int __init usnic_ib_init(void)
return err; 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"); usnic_err("Unable to register with PCI\n");
goto out_umem_fini; goto out_umem_fini;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment