aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalesh AP <[email protected]>2023-05-18 23:48:14 -0700
committerJason Gunthorpe <[email protected]>2023-05-19 13:26:18 -0300
commitb989f90cef0af48aa5679b6a75476371705ec53c (patch)
tree9b8615019dc3d9f88f4dcc0d4af08e62342e9b32
parentff2e4bfd162cf66a112a81509e419805add44d64 (diff)
RDMA/bnxt_re: Remove a redundant check inside bnxt_re_update_gid
The NULL check inside bnxt_re_update_gid() always return false. If sgid_tbl->tbl is not allocated, then dev_init would have failed. Fixes: 5fac5b1b297f ("RDMA/bnxt_re: Add vlan tag for untagged RoCE traffic when PFC is configured") Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Saravanan Vajravel <[email protected]> Reviewed-by: Damodharam Ammepalli <[email protected]> Reviewed-by: Ajit Khaparde <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
-rw-r--r--drivers/infiniband/hw/bnxt_re/main.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index a44f2900e343..4718af6c4c47 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -969,12 +969,6 @@ static int bnxt_re_update_gid(struct bnxt_re_dev *rdev)
if (!ib_device_try_get(&rdev->ibdev))
return 0;
- if (!sgid_tbl) {
- ibdev_err(&rdev->ibdev, "QPLIB: SGID table not allocated");
- rc = -EINVAL;
- goto out;
- }
-
for (index = 0; index < sgid_tbl->active; index++) {
gid_idx = sgid_tbl->hw_id[index];
@@ -992,7 +986,7 @@ static int bnxt_re_update_gid(struct bnxt_re_dev *rdev)
rc = bnxt_qplib_update_sgid(sgid_tbl, &gid, gid_idx,
rdev->qplib_res.netdev->dev_addr);
}
-out:
+
ib_device_put(&rdev->ibdev);
return rc;
}