aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-11-07 09:45:17 -0500
committerDoug Ledford <dledford@redhat.com>2017-11-13 16:18:33 -0500
commitf4e96c1a717176dc52843a41b549aaa9128279c2 (patch)
tree50e2dac9ce16c37ad778fe8d05ecec17e14a02de
parente08ce2e82b2fc5cdd07de170e8b9e8327625005c (diff)
IB/ocrdma_hw: remove unnecessary code in ocrdma_mbx_dealloc_lkey
Check on return value and goto label mbx_err are unnecessary. Addresses-Coverity-ID: 1268780 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_hw.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
index f8c14c7baedb..0ba695a88b62 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -1947,7 +1947,7 @@ mbx_err:
1947 1947
1948int ocrdma_mbx_dealloc_lkey(struct ocrdma_dev *dev, int fr_mr, u32 lkey) 1948int ocrdma_mbx_dealloc_lkey(struct ocrdma_dev *dev, int fr_mr, u32 lkey)
1949{ 1949{
1950 int status = -ENOMEM; 1950 int status;
1951 struct ocrdma_dealloc_lkey *cmd; 1951 struct ocrdma_dealloc_lkey *cmd;
1952 1952
1953 cmd = ocrdma_init_emb_mqe(OCRDMA_CMD_DEALLOC_LKEY, sizeof(*cmd)); 1953 cmd = ocrdma_init_emb_mqe(OCRDMA_CMD_DEALLOC_LKEY, sizeof(*cmd));
@@ -1956,9 +1956,7 @@ int ocrdma_mbx_dealloc_lkey(struct ocrdma_dev *dev, int fr_mr, u32 lkey)
1956 cmd->lkey = lkey; 1956 cmd->lkey = lkey;
1957 cmd->rsvd_frmr = fr_mr ? 1 : 0; 1957 cmd->rsvd_frmr = fr_mr ? 1 : 0;
1958 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); 1958 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd);
1959 if (status) 1959
1960 goto mbx_err;
1961mbx_err:
1962 kfree(cmd); 1960 kfree(cmd);
1963 return status; 1961 return status;
1964} 1962}