diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-05-31 19:05:56 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-06-06 19:19:07 -0400 |
commit | da1f857be62ca0472024da37eab068b3b8ce0a15 (patch) | |
tree | a94ed310233f1fa87a411ab7e6c48657f1c47792 /drivers/infiniband/core | |
parent | f242d93ae92032f78840471e5c2bfc2d04ae324c (diff) | |
download | linux-da1f857be62ca0472024da37eab068b3b8ce0a15.tar.bz2 |
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>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index 5516fb070344..8b8a8d9cf134 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; } |