Commit aeea6cc0 authored by Andrey Strachuk's avatar Andrey Strachuk Committed by Leon Romanovsky

RDMA: remove useless condition in siw_create_cq()

Comparison of 'cq' with NULL is useless since
'cq' is a result of container_of and cannot be NULL
in any reasonable scenario.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 303ae1cd ("rdma/siw: application interface")
Link: https://lore.kernel.org/r/20220711151251.17089-1-strochuk@ispras.ruSigned-off-by: default avatarAndrey Strachuk <strochuk@ispras.ru>
Acked-by: default avatarBernard Metzler <bmt@zurich.ibm.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent fc411473
...@@ -1167,7 +1167,7 @@ int siw_create_cq(struct ib_cq *base_cq, const struct ib_cq_init_attr *attr, ...@@ -1167,7 +1167,7 @@ int siw_create_cq(struct ib_cq *base_cq, const struct ib_cq_init_attr *attr,
err_out: err_out:
siw_dbg(base_cq->device, "CQ creation failed: %d", rv); siw_dbg(base_cq->device, "CQ creation failed: %d", rv);
if (cq && cq->queue) { if (cq->queue) {
struct siw_ucontext *ctx = struct siw_ucontext *ctx =
rdma_udata_to_drv_context(udata, struct siw_ucontext, rdma_udata_to_drv_context(udata, struct siw_ucontext,
base_ucontext); base_ucontext);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment