aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/usnic
diff options
context:
space:
mode:
authorSelvin Xavier <selvin.xavier@broadcom.com>2017-08-17 07:58:07 -0700
committerDoug Ledford <dledford@redhat.com>2017-08-22 16:23:25 -0400
commit7be05753ccc27ce056d45f06a50d150927a88ed7 (patch)
treedb38f7497eb2a7189106e33fcecaa918e34491e3 /drivers/infiniband/hw/usnic
parentIB/pvrdma: Remove unused function (diff)
downloadlinux-dev-7be05753ccc27ce056d45f06a50d150927a88ed7.tar.xz
linux-dev-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/usnic')
-rw-r--r--drivers/infiniband/hw/usnic/usnic_ib_verbs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
index e5f57dd49980..97dd79ebb590 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
@@ -309,8 +309,8 @@ int usnic_ib_query_port(struct ib_device *ibdev, u8 port,
usnic_dbg("\n");
mutex_lock(&us_ibdev->usdev_lock);
- if (!ib_get_eth_speed(ibdev, port, &props->active_speed,
- &props->active_width)) {
+ if (ib_get_eth_speed(ibdev, port, &props->active_speed,
+ &props->active_width)) {
mutex_unlock(&us_ibdev->usdev_lock);
return -EINVAL;
}