diff options
author | Selvin Xavier <selvin.xavier@broadcom.com> | 2017-08-17 16:58:07 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-08-22 22:23:25 +0200 |
commit | 7be05753ccc27ce056d45f06a50d150927a88ed7 (patch) | |
tree | db38f7497eb2a7189106e33fcecaa918e34491e3 /drivers/infiniband/hw/bnxt_re | |
parent | IB/pvrdma: Remove unused function (diff) | |
download | linux-7be05753ccc27ce056d45f06a50d150927a88ed7.tar.xz linux-7be05753ccc27ce056d45f06a50d150927a88ed7.zip |
RDMA: Fix return value check for ib_get_eth_speed()
ib_get_eth_speed() return 0 on success. Fixing the condition checking
and prevent reporting failure for query_port verb.
Fixes: d41861942fc5 ("Add generic function to extract IB speed from netdev")
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/bnxt_re')
-rw-r--r-- | drivers/infiniband/hw/bnxt_re/ib_verbs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index 24e2785774b8..43b3dee4b6ba 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -264,8 +264,8 @@ int bnxt_re_query_port(struct ib_device *ibdev, u8 port_num, * IB stack to avoid race in the NETDEV_UNREG path */ if (test_bit(BNXT_RE_FLAG_IBDEV_REGISTERED, &rdev->flags)) - if (!ib_get_eth_speed(ibdev, port_num, &port_attr->active_speed, - &port_attr->active_width)) + if (ib_get_eth_speed(ibdev, port_num, &port_attr->active_speed, + &port_attr->active_width)) return -EINVAL; return 0; } |