Commit a6a9274a authored by Colin Ian King's avatar Colin Ian King Committed by Jason Gunthorpe

RDMA/nes: remove redundant check on udata

The non-null check on udata is redundant as this check was performed just
a few statements earlier and the check is always true as udata must be
non-null at this point. Remove redundant the check on udata and the
redundant else part that can never be executed.

Detected by CoverityScan, CID#1477317 ("Logically dead code")

Fixes: 89944450 ("IB/{hw,sw}: Remove 'uobject->context' dependency in object creation APIs")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 63826753
......@@ -1039,7 +1039,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
}
if (req.user_qp_buffer)
nesqp->nesuqp_addr = req.user_qp_buffer;
if (udata) {
nesqp->user_mode = 1;
if (virt_wqs) {
err = 1;
......@@ -1081,11 +1081,6 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
set_bit(nesqp->mmap_sq_db_index, nes_ucontext->allocated_wqs);
nes_ucontext->mmap_nesqp[nesqp->mmap_sq_db_index] = nesqp;
nes_ucontext->first_free_wq = nesqp->mmap_sq_db_index + 1;
} else {
nes_free_resource(nesadapter, nesadapter->allocated_qps, qp_num);
kfree(nesqp->allocated_buffer);
return ERR_PTR(-EFAULT);
}
}
err = (!virt_wqs) ? nes_setup_mmap_qp(nesqp, nesvnic, sq_size, rq_size) :
nes_setup_virt_qp(nesqp, nespbl, nesvnic, sq_size, rq_size);
......
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