]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
RDMA/irdma: Remove redundant NULL check of udata in irdma_create_user_ah()
authorTuo Li <islituo@gmail.com>
Wed, 12 Nov 2025 12:02:53 +0000 (20:02 +0800)
committerLeon Romanovsky <leon@kernel.org>
Wed, 12 Nov 2025 12:10:25 +0000 (07:10 -0500)
The variable udata cannot be NULL because irdma_create_user_ah() always
receives it. Therefore, the if() check can be safely removed.

Signed-off-by: Tuo Li <islituo@gmail.com>
Link: https://patch.msgid.link/20251112120253.68945-1-islituo@gmail.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/irdma/verbs.c

index 66ecaa0f5be609b9f35997df0267490fe55d412d..5fb6014ab8cb40f72196c842215f293bf98e4002 100644 (file)
@@ -5210,7 +5210,7 @@ static int irdma_create_user_ah(struct ib_ah *ibah,
        struct irdma_ah *parent_ah;
        int err;
 
-       if (udata && udata->outlen < IRDMA_CREATE_AH_MIN_RESP_LEN)
+       if (udata->outlen < IRDMA_CREATE_AH_MIN_RESP_LEN)
                return -EINVAL;
 
        err = irdma_setup_ah(ibah, attr);