From: Yuval Basson <yba...@marvell.com> Date: Tue, 19 May 2020 01:21:00 +0300
> --- a/drivers/net/ethernet/qlogic/qed/qed_rdma.c > +++ b/drivers/net/ethernet/qlogic/qed/qed_rdma.c > @@ -212,6 +212,15 @@ static int qed_rdma_alloc(struct qed_hwfn *p_hwfn) > goto free_rdma_port; > } > > + /* Allocate bit map for XRC Domains */ > + rc = qed_rdma_bmap_alloc(p_hwfn, &p_rdma_info->xrcd_map, > + QED_RDMA_MAX_XRCDS, "XRCD"); > + if (rc) { > + DP_VERBOSE(p_hwfn, QED_MSG_RDMA, > + "Failed to allocate xrcd_map,rc = %d\n", rc); > + return rc; > + } You need to perform cleanups rather than just return 'rc'. > @@ -271,6 +280,19 @@ static int qed_rdma_alloc(struct qed_hwfn *p_hwfn) > goto free_cid_map; > } > > + /* The first SRQ follows the last XRC SRQ. This means that the > + * SRQ IDs start from an offset equals to max_xrc_srqs. > + */ > + p_rdma_info->srq_id_offset = p_hwfn->p_cxt_mngr->xrc_srq_count; > + rc = qed_rdma_bmap_alloc(p_hwfn, > + &p_rdma_info->xrc_srq_map, > + p_hwfn->p_cxt_mngr->xrc_srq_count, "XRC SRQ"); > + if (rc) { > + DP_VERBOSE(p_hwfn, QED_MSG_RDMA, > + "Failed to allocate xrc srq bitmap, rc = %d\n", rc); > + return rc; Likewise.