RDMA/irdma: Remove redundant NULL check of udata in irdma_create_user_ah()
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/infiniband/hw/irdma/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/irdma/verbs.c +1 -1
@@ -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);
Signature · 1 line
2.43.0
Quoted 6 lines · Tuo Li
The variable udata cannot be NULL because
irdma_create_user_ah()always receives it. Therefore, theif()check can be safely removed.Thank Leon Romanovsky for helpful advice.
Applied, thanks!
[1/1] RDMA/irdma: Remove redundant NULL check of udata in irdma_create_user_ah()
(no commit info)
Best regards,
Signature · 1 line
Leon Romanovsky <[email protected]>