[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251112120253.68945-1-islituo@gmail.com>
Date: Wed, 12 Nov 2025 20:02:53 +0800
From: Tuo Li <islituo@...il.com>
To: krzysztof.czurylo@...el.com,
tatyana.e.nikolova@...el.com,
jgg@...pe.ca,
leon@...nel.org
Cc: linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org,
Tuo Li <islituo@...il.com>
Subject: [PATCH] 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.
Thank Leon Romanovsky for helpful advice.
Signed-off-by: Tuo Li <islituo@...il.com>
---
drivers/infiniband/hw/irdma/verbs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
index c883c9ea5a83..a9ae5a38d03d 100644
--- a/drivers/infiniband/hw/irdma/verbs.c
+++ b/drivers/infiniband/hw/irdma/verbs.c
@@ -5204,7 +5204,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);
--
2.43.0
Powered by blists - more mailing lists