Commit e190bc05 authored by Govindaraj Saminathan's avatar Govindaraj Saminathan Committed by Kalle Valo

ath11k: cleanup reo command error code overwritten

should not overwrite the error code. No buffer available then return
invalid. For other failures return the error code of actual failure.
Signed-off-by: default avatarGovindaraj Saminathan <gsamin@codeaurora.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1586776872-25766-1-git-send-email-gsamin@codeaurora.org
parent 8a7968be
......@@ -543,8 +543,12 @@ int ath11k_dp_tx_send_reo_cmd(struct ath11k_base *ab, struct dp_rx_tid *rx_tid,
cmd_ring = &ab->hal.srng_list[dp->reo_cmd_ring.ring_id];
cmd_num = ath11k_hal_reo_cmd_send(ab, cmd_ring, type, cmd);
/* cmd_num should start from 1, during failure return the error code */
if (cmd_num < 0)
return cmd_num;
/* reo cmd ring descriptors has cmd_num starting from 1 */
if (cmd_num <= 0)
if (cmd_num == 0)
return -EINVAL;
if (!cb)
......
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