* [PATCH] IB/usnic: Fix error return code
@ 2016-08-10 15:45 Christophe JAILLET
2016-08-22 18:24 ` Doug Ledford
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2016-08-10 15:45 UTC (permalink / raw)
To: benve, dgoodell, dledford, sean.hefty
Cc: linux-rdma, linux-kernel, kernel-janitors, Christophe JAILLET
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>
---
drivers/infiniband/hw/usnic/usnic_ib_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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;
}
--
2.7.4
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] IB/usnic: Fix error return code
2016-08-10 15:45 [PATCH] IB/usnic: Fix error return code Christophe JAILLET
@ 2016-08-22 18:24 ` Doug Ledford
0 siblings, 0 replies; 2+ messages in thread
From: Doug Ledford @ 2016-08-22 18:24 UTC (permalink / raw)
To: Christophe JAILLET, benve, dgoodell, sean.hefty
Cc: linux-rdma, linux-kernel, kernel-janitors
[-- Attachment #1.1: Type: text/plain, Size: 320 bytes --]
On 8/10/2016 11:45 AM, Christophe JAILLET wrote:
> 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>
Thanks, applied.
--
Doug Ledford <dledford@redhat.com>
GPG Key ID: 0E572FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-22 18:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-10 15:45 [PATCH] IB/usnic: Fix error return code Christophe JAILLET
2016-08-22 18:24 ` Doug Ledford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).