]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
RDMA/bnxt_re: Delete always true SGID table check
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Thu, 14 Aug 2025 11:25:54 +0000 (16:55 +0530)
committerLeon Romanovsky <leon@kernel.org>
Mon, 8 Sep 2025 07:08:35 +0000 (03:08 -0400)
The "sgid_tbl" inside "rdev->qplib_res" is a static memory.
Hence, the check always return true.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Link: https://patch.msgid.link/20250814112555.221665-9-kalesh-anakkur.purayil@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/bnxt_re/ib_verbs.c

index 98bc8b6290f1896dd865324a1c5a07fbba3036e8..195a9ba6f65dbb912ce858d4eb771ed9653c39fc 100644 (file)
@@ -375,7 +375,7 @@ int bnxt_re_del_gid(const struct ib_gid_attr *attr, void **context)
        if (!ctx)
                return -EINVAL;
 
-       if (sgid_tbl && sgid_tbl->active) {
+       if (sgid_tbl->active) {
                if (ctx->idx >= sgid_tbl->max)
                        return -EINVAL;
                gid_to_del = &sgid_tbl->tbl[ctx->idx].gid;