summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorDevesh Sharma <devesh.sharma@emulex.com>2014-12-18 14:13:04 +0530
committerRoland Dreier <roland@purestorage.com>2015-02-18 08:31:04 -0800
commita601dc77f8bf71818d679cbd97e953becb2a085e (patch)
treea89fb63ef6ab270487aec8b9ec1f43a44bcc43a0 /drivers/infiniband
parent043e9deed9ffd7da4349c8078917eb28a5f2d9c4 (diff)
downloadop-kernel-dev-a601dc77f8bf71818d679cbd97e953becb2a085e.zip
op-kernel-dev-a601dc77f8bf71818d679cbd97e953becb2a085e.tar.gz
RDMA/ocrdma: Honor return value of ocrdma_resolve_dmac
Check for return value for ocrdma_resolve_dmac while setting AV params. Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com> Signed-off-by: Mitesh Ahuja <mitesh.ahuja@emulex.com> Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_hw.c4
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 f283626..6e9680d 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -2451,7 +2451,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. */
OpenPOWER on IntegriCloud