Message ID | 20160531160556.GA23959@mwanda (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Nice catch, looks good. Reviewed-by: Mark Bloch <markb@mellanox.com> > -----Original Message----- > From: Dan Carpenter [mailto:dan.carpenter@oracle.com] > Sent: Tuesday, May 31, 2016 7:06 PM > To: Doug Ledford <dledford@redhat.com>; Mark Bloch > <markb@mellanox.com> > Cc: Sean Hefty <sean.hefty@intel.com>; Hal Rosenstock > <hal.rosenstock@gmail.com>; Matan Barak <matanb@mellanox.com>; Or > Gerlitz <ogerlitz@mellanox.com>; Ira Weiny <ira.weiny@intel.com>; Haggai > Eran <haggaie@mellanox.com>; Leon Romanovsky > <leonro@mellanox.com>; Jason Gunthorpe > <jgunthorpe@obsidianresearch.com>; Yotam Kenneth (revoke on 13.10.15) > <yotamke@mellanox.com>; Parav Pandit <pandit.parav@gmail.com>; linux- > rdma@vger.kernel.org; kernel-janitors@vger.kernel.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@oracle.com> > > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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@oracle.com> > > 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.
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; }
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@oracle.com> -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html