aboutsummaryrefslogtreecommitdiff
path: root/sys/ofed
diff options
context:
space:
mode:
authorSlava Shwartsman <slavash@FreeBSD.org>2018-12-05 13:18:20 +0000
committerSlava Shwartsman <slavash@FreeBSD.org>2018-12-05 13:18:20 +0000
commitf628150b6c03d57c5cd129aa995f26c597f95f7c (patch)
treeb4ab8c7c3b1948d9ce23d45ad72db190a1d94f82 /sys/ofed
parent452d59e130d097a5a785b06262995acbfe3c02fd (diff)
downloadsrc-f628150b6c03d57c5cd129aa995f26c597f95f7c.tar.gz
src-f628150b6c03d57c5cd129aa995f26c597f95f7c.zip
ibcore: Make sure GID index variable gets initialized.
Submitted by: hselasky@ Approved by: hselasky (mentor) MFC after: 1 week Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/head/; revision=341521
Diffstat (limited to 'sys/ofed')
-rw-r--r--sys/ofed/drivers/infiniband/core/ib_verbs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/ofed/drivers/infiniband/core/ib_verbs.c b/sys/ofed/drivers/infiniband/core/ib_verbs.c
index 660c9b8ea59b..2a2efb60558a 100644
--- a/sys/ofed/drivers/infiniband/core/ib_verbs.c
+++ b/sys/ofed/drivers/infiniband/core/ib_verbs.c
@@ -458,7 +458,7 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 port_num,
struct ib_ah_attr *ah_attr)
{
u32 flow_class;
- u16 gid_index;
+ u16 gid_index = 0;
int ret;
enum rdma_network_type net_type = RDMA_NETWORK_IB;
enum ib_gid_type gid_type = IB_GID_TYPE_IB;
@@ -524,8 +524,6 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 port_num,
&gid_index);
if (ret)
return ret;
- } else {
- gid_index = 0;
}
}