mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
RDMA/bnxt_re: Fix to remove unnecessary return labels
[ Upstream commit9b3ee47796] If there is no cleanup needed then just return directly. This cleans up the code and improve readability. Fixes:1ac5a40479("RDMA/bnxt_re: Add bnxt_re RoCE driver") Link: https://lore.kernel.org/r/1684478897-12247-3-git-send-email-selvin.xavier@broadcom.com Reviewed-by: Kashyap Desai <kashyap.desai@broadcom.com> Reviewed-by: Saravanan Vajravel <saravanan.vajravel@broadcom.com> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
adc129e894
commit
ced019c1f9
@@ -1603,7 +1603,7 @@ static int bnxt_qplib_put_inline(struct bnxt_qplib_qp *qp,
|
|||||||
il_src = (void *)wqe->sg_list[indx].addr;
|
il_src = (void *)wqe->sg_list[indx].addr;
|
||||||
t_len += len;
|
t_len += len;
|
||||||
if (t_len > qp->max_inline_data)
|
if (t_len > qp->max_inline_data)
|
||||||
goto bad;
|
return -ENOMEM;
|
||||||
while (len) {
|
while (len) {
|
||||||
if (pull_dst) {
|
if (pull_dst) {
|
||||||
pull_dst = false;
|
pull_dst = false;
|
||||||
@@ -1627,8 +1627,6 @@ static int bnxt_qplib_put_inline(struct bnxt_qplib_qp *qp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return t_len;
|
return t_len;
|
||||||
bad:
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 bnxt_qplib_put_sges(struct bnxt_qplib_hwq *hwq,
|
static u32 bnxt_qplib_put_sges(struct bnxt_qplib_hwq *hwq,
|
||||||
@@ -2058,7 +2056,7 @@ int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq)
|
|||||||
hwq_attr.sginfo = &cq->sg_info;
|
hwq_attr.sginfo = &cq->sg_info;
|
||||||
rc = bnxt_qplib_alloc_init_hwq(&cq->hwq, &hwq_attr);
|
rc = bnxt_qplib_alloc_init_hwq(&cq->hwq, &hwq_attr);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto exit;
|
return rc;
|
||||||
|
|
||||||
RCFW_CMD_PREP(req, CREATE_CQ, cmd_flags);
|
RCFW_CMD_PREP(req, CREATE_CQ, cmd_flags);
|
||||||
|
|
||||||
@@ -2099,7 +2097,6 @@ int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq)
|
|||||||
|
|
||||||
fail:
|
fail:
|
||||||
bnxt_qplib_free_hwq(res, &cq->hwq);
|
bnxt_qplib_free_hwq(res, &cq->hwq);
|
||||||
exit:
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user