From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuval Shaia Subject: Re: [PATCH] IB/ocrdma_hw: remove unnecessary code in ocrdma_mbx_dealloc_lkey Date: Tue, 7 Nov 2017 08:31:36 +0200 Message-ID: <20171107063135.GA3815@yuvallap> References: <20171106143514.GA19786@embeddedor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20171106143514.GA19786-L1vi/lXTdts+Va1GwOuvDg@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: "Gustavo A. R. Silva" Cc: Selvin Xavier , Devesh Sharma , Doug Ledford , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-rdma@vger.kernel.org On Mon, Nov 06, 2017 at 08:35:14AM -0600, Gustavo A. R. Silva wrote: > Check on return value and goto label mbx_err are unnecessary. > > Addresses-Coverity-ID: 1268780 What's that? > Signed-off-by: Gustavo A. R. Silva > --- > drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c > index f8c14c7..db02bbb 100644 > --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c > +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c > @@ -1956,9 +1956,7 @@ int ocrdma_mbx_dealloc_lkey(struct ocrdma_dev *dev, int fr_mr, u32 lkey) > cmd->lkey = lkey; > cmd->rsvd_frmr = fr_mr ? 1 : 0; > status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); > - if (status) > - goto mbx_err; > -mbx_err: > + > kfree(cmd); > return status; Reviewed-by: Yuval Shaia > } > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html