Commit f76f750a authored by Wei Yongjun's avatar Wei Yongjun Committed by Kalle Valo
Browse files

ath11k: fix error return code in ath11k_dp_alloc()



Fix to return negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: d0998eb8 ("ath11k: optimise ath11k_dp_tx_completion_handler")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200427104621.23752-1-weiyongjun1@huawei.com
parent 2326aa01
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -911,9 +911,11 @@ int ath11k_dp_alloc(struct ath11k_base *ab)
		dp->tx_ring[i].tx_status_head = 0;
		dp->tx_ring[i].tx_status_tail = DP_TX_COMP_RING_SIZE - 1;
		dp->tx_ring[i].tx_status = kmalloc(size, GFP_KERNEL);
		if (!dp->tx_ring[i].tx_status)
		if (!dp->tx_ring[i].tx_status) {
			ret = -ENOMEM;
			goto fail_cmn_srng_cleanup;
		}
	}

	for (i = 0; i < HAL_DSCP_TID_MAP_TBL_NUM_ENTRIES_MAX; i++)
		ath11k_hal_tx_set_dscp_tid_map(ab, i);