Commit 7cae3519 authored by Daniel Mack's avatar Daniel Mack Committed by Kalle Valo

wcn36xx: check for DMA mapping errors in wcn36xx_dxe_tx_frame()

Bail out if the mapping fails. Even though this hasn't occured during
tests, this unlikely case should still be handled.
Signed-off-by: default avatarDaniel Mack <daniel@zonque.org>
Acked-by: default avatarRamon Fried <rfried@codeaurora.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 9c27489a
...@@ -705,6 +705,11 @@ int wcn36xx_dxe_tx_frame(struct wcn36xx *wcn, ...@@ -705,6 +705,11 @@ int wcn36xx_dxe_tx_frame(struct wcn36xx *wcn,
ctl->skb->data, ctl->skb->data,
ctl->skb->len, ctl->skb->len,
DMA_TO_DEVICE); DMA_TO_DEVICE);
if (dma_mapping_error(wcn->dev, desc->src_addr_l)) {
dev_err(wcn->dev, "unable to DMA map src_addr_l\n");
ret = -ENOMEM;
goto unlock;
}
desc->dst_addr_l = ch->dxe_wq; desc->dst_addr_l = ch->dxe_wq;
desc->fr_len = ctl->skb->len; desc->fr_len = ctl->skb->len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment