ath10k: Correct error handling of dma_map_single()
authorBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 11 Oct 2019 18:28:17 +0000 (11:28 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 14 Oct 2019 08:42:48 +0000 (11:42 +0300)
commitd43810b2c1808ac865aa1a2a2c291644bf95345c
tree1cd8993a0627cde0c074bbd9fd2757d9edce161d
parentf433abfc2f76b7ebf9a7211351bd2ee021daed17
ath10k: Correct error handling of dma_map_single()

The return value of dma_map_single() should be checked for errors using
dma_mapping_error() and the skb has been dequeued so it needs to be
freed.

This was found when enabling CONFIG_DMA_API_DEBUG and it warned about the
missing dma_mapping_error() call.

Fixes: 1807da49733e ("ath10k: wmi: add management tx by reference support over wmi")
Reported-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/mac.c