* [patch] IB/core: fix an error code in ib_core_init()
@ 2016-05-31 16:05 Dan Carpenter
2016-06-01 5:20 ` Mark Bloch
2016-06-06 23:19 ` Doug Ledford
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-05-31 16:05 UTC (permalink / raw)
To: Doug Ledford, Mark Bloch
Cc: Sean Hefty, Hal Rosenstock, Matan Barak, Or Gerlitz, Ira Weiny,
Haggai Eran, Leon Romanovsky, Jason Gunthorpe, Yotam Kenneth,
Parav Pandit, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
We should return the error code if ib_add_ibnl_clients() fails. The
current code returns success.
Fixes: 735c631ae99d ('IB/core: Register SA ibnl client during ib_core initialization')
Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 5516fb0..8b8a8d9 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -1024,7 +1024,8 @@ static int __init ib_core_init(void)
goto err_mad;
}
- if (ib_add_ibnl_clients()) {
+ ret = ib_add_ibnl_clients();
+ if (ret) {
pr_warn("Couldn't register ibnl clients\n");
goto err_sa;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [patch] IB/core: fix an error code in ib_core_init()
2016-05-31 16:05 [patch] IB/core: fix an error code in ib_core_init() Dan Carpenter
@ 2016-06-01 5:20 ` Mark Bloch
2016-06-06 23:19 ` Doug Ledford
1 sibling, 0 replies; 3+ messages in thread
From: Mark Bloch @ 2016-06-01 5:20 UTC (permalink / raw)
To: Dan Carpenter, Doug Ledford
Cc: Sean Hefty, Hal Rosenstock, Matan Barak, Or Gerlitz, Ira Weiny,
Haggai Eran, Leon Romanovsky, Jason Gunthorpe,
Yotam Kenneth (revoke on 13.10.15), Parav Pandit,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Nice catch, looks good.
Reviewed-by: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org]
> Sent: Tuesday, May 31, 2016 7:06 PM
> To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>; Mark Bloch
> <markb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Cc: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; Hal Rosenstock
> <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>; Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>; Or
> Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>; Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; Haggai
> Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>; Leon Romanovsky
> <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>; Jason Gunthorpe
> <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>; Yotam Kenneth (revoke on 13.10.15)
> <yotamke-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>; Parav Pandit <pandit.parav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>; linux-
> rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Subject: [patch] IB/core: fix an error code in ib_core_init()
>
> We should return the error code if ib_add_ibnl_clients() fails. The
> current code returns success.
>
> Fixes: 735c631ae99d ('IB/core: Register SA ibnl client during ib_core
> initialization')
> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
>
> diff --git a/drivers/infiniband/core/device.c
> b/drivers/infiniband/core/device.c
> index 5516fb0..8b8a8d9 100644
> --- a/drivers/infiniband/core/device.c
> +++ b/drivers/infiniband/core/device.c
> @@ -1024,7 +1024,8 @@ static int __init ib_core_init(void)
> goto err_mad;
> }
>
> - if (ib_add_ibnl_clients()) {
> + ret = ib_add_ibnl_clients();
> + if (ret) {
> pr_warn("Couldn't register ibnl clients\n");
> goto err_sa;
> }
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [patch] IB/core: fix an error code in ib_core_init()
2016-05-31 16:05 [patch] IB/core: fix an error code in ib_core_init() Dan Carpenter
2016-06-01 5:20 ` Mark Bloch
@ 2016-06-06 23:19 ` Doug Ledford
1 sibling, 0 replies; 3+ messages in thread
From: Doug Ledford @ 2016-06-06 23:19 UTC (permalink / raw)
To: Dan Carpenter, Mark Bloch
Cc: Sean Hefty, Hal Rosenstock, Matan Barak, Or Gerlitz, Ira Weiny,
Haggai Eran, Leon Romanovsky, Jason Gunthorpe, Yotam Kenneth,
Parav Pandit, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1.1: Type: text/plain, Size: 818 bytes --]
On 5/31/2016 12:05 PM, Dan Carpenter wrote:
> We should return the error code if ib_add_ibnl_clients() fails. The
> current code returns success.
>
> Fixes: 735c631ae99d ('IB/core: Register SA ibnl client during ib_core initialization')
> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
>
> diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
> index 5516fb0..8b8a8d9 100644
> --- a/drivers/infiniband/core/device.c
> +++ b/drivers/infiniband/core/device.c
> @@ -1024,7 +1024,8 @@ static int __init ib_core_init(void)
> goto err_mad;
> }
>
> - if (ib_add_ibnl_clients()) {
> + ret = ib_add_ibnl_clients();
> + if (ret) {
> pr_warn("Couldn't register ibnl clients\n");
> goto err_sa;
> }
>
Thanks, applied.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-06 23:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-31 16:05 [patch] IB/core: fix an error code in ib_core_init() Dan Carpenter
2016-06-01 5:20 ` Mark Bloch
2016-06-06 23:19 ` Doug Ledford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox