Skip to content

Commit 80dde18

Browse files
Kalesh APrleon
Kalesh AP
authored andcommitted
RDMA/bnxt_re: Add a missing check in bnxt_qplib_query_srq
Before populating the response, driver has to check the status of HWRM command. Fixes: 37cb11a ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 3687b45 commit 80dde18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/infiniband/hw/bnxt_re/qplib_fp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,8 @@ int bnxt_qplib_query_srq(struct bnxt_qplib_res *res,
744744
bnxt_qplib_fill_cmdqmsg(&msg, &req, &resp, &sbuf, sizeof(req),
745745
sizeof(resp), 0);
746746
rc = bnxt_qplib_rcfw_send_message(rcfw, &msg);
747-
srq->threshold = le16_to_cpu(sb->srq_limit);
747+
if (!rc)
748+
srq->threshold = le16_to_cpu(sb->srq_limit);
748749
dma_free_coherent(&rcfw->pdev->dev, sbuf.size,
749750
sbuf.sb, sbuf.dma_addr);
750751

0 commit comments

Comments
 (0)