From: Tuo Li Date: Wed, 12 Nov 2025 12:02:53 +0000 (+0800) Subject: RDMA/irdma: Remove redundant NULL check of udata in irdma_create_user_ah() X-Git-Tag: v6.19-rc1~130^2~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a49a9f4555bde0b008f2225620ae1b2480d2b627;p=thirdparty%2Fkernel%2Flinux.git RDMA/irdma: Remove redundant NULL check of udata in irdma_create_user_ah() 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 Link: https://patch.msgid.link/20251112120253.68945-1-islituo@gmail.com Signed-off-by: Leon Romanovsky --- diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index 66ecaa0f5be60..5fb6014ab8cb4 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -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);