From: Christophe Jaillet Date: Wed, 10 Aug 2016 15:45:01 +0000 (+0200) Subject: IB/usnic: Fix error return code X-Git-Tag: MMI-PSA29.97-13-9~7008^2~97 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=86cd747c6dd6cdbc825e36ad5f0029f3c5a37776;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: Doug Ledford --- 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; }