提交 2bf4b33f 编写于 作者: M Michael J. Ruhl 提交者: Jason Gunthorpe

IB/hfi1: Missing return value in error path for user sdma

If the set_txreq_header_agh() function returns an error, the exit path
is chosen.

In this path, the code fails to set the return value.  This will cause
the caller to not realize an error has occurred.

Set the return value correctly in the error path.
Signed-off-by: NMichael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
上级 3ca633f1
...@@ -860,8 +860,10 @@ static int user_sdma_send_pkts(struct user_sdma_request *req, u16 maxpkts) ...@@ -860,8 +860,10 @@ static int user_sdma_send_pkts(struct user_sdma_request *req, u16 maxpkts)
changes = set_txreq_header_ahg(req, tx, changes = set_txreq_header_ahg(req, tx,
datalen); datalen);
if (changes < 0) if (changes < 0) {
ret = changes;
goto free_tx; goto free_tx;
}
} }
} else { } else {
ret = sdma_txinit(&tx->txreq, 0, sizeof(req->hdr) + ret = sdma_txinit(&tx->txreq, 0, sizeof(req->hdr) +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册