Check for return value for ocrdma_resolve_dmac while setting AV params.

Signed-off-by: Devesh Sharma <devesh.sha...@emulex.com>
Signed-off-by: Mitesh Ahuja <mitesh.ah...@emulex.com>
Signed-off-by: Selvin Xavier <selvin.xav...@emulex.com>
---
 drivers/infiniband/hw/ocrdma/ocrdma_hw.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c 
b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
index 65b5923..8176bd6 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -2452,7 +2452,9 @@ static int ocrdma_set_av_params(struct ocrdma_qp *qp,
 
        qp->sgid_idx = ah_attr->grh.sgid_index;
        memcpy(&cmd->params.sgid[0], &sgid.raw[0], sizeof(cmd->params.sgid));
-       ocrdma_resolve_dmac(qp->dev, ah_attr, &mac_addr[0]);
+       status = ocrdma_resolve_dmac(qp->dev, ah_attr, &mac_addr[0]);
+       if (status)
+               return status;
        cmd->params.dmac_b0_to_b3 = mac_addr[0] | (mac_addr[1] << 8) |
                                (mac_addr[2] << 16) | (mac_addr[3] << 24);
        /* convert them to LE format. */
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to