diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-12-12 19:42:51 +0000 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-12-18 19:53:46 +0200 |
commit | 4358bcb54bb9ede559e60685b9e544e723197ca1 (patch) | |
tree | 9b1a5fd07e400d329a4aa257119c79531fed5cf4 /drivers/net/wireless/ath/ath11k | |
parent | ath11k: fix uninitialized variable radioup (diff) | |
download | linux-dev-4358bcb54bb9ede559e60685b9e544e723197ca1.tar.xz linux-dev-4358bcb54bb9ede559e60685b9e544e723197ca1.zip |
ath11k: fix missing free of skb on error return path
The error handling when the call to ath11k_hal_srng_get_entrysize fails
leaks skb, fix this by returning via the err_free return path that will
ensure the skb is free'd.
Addresses-Coverity: ("Resource leak")
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath11k')
-rw-r--r-- | drivers/net/wireless/ath/ath11k/dp_tx.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c index e994021e9355..918305dda106 100644 --- a/drivers/net/wireless/ath/ath11k/dp_tx.c +++ b/drivers/net/wireless/ath/ath11k/dp_tx.c @@ -669,8 +669,10 @@ int ath11k_dp_tx_htt_srng_setup(struct ath11k_base *ab, u32 ring_id, HAL_ADDR_MSB_REG_SHIFT; ret = ath11k_hal_srng_get_entrysize(ring_type); - if (ret < 0) - return -EINVAL; + if (ret < 0) { + ret = -EINVAL; + goto err_free; + } ring_entry_sz = ret; |