Commit ba7ee55f authored by Michal Kazior's avatar Michal Kazior Committed by Kalle Valo

ath10k: print errcode when CE ring setup fails

This makes it possible to see the reason why the
setup fails. It also adheres to code style of
error checking in ath drivers.
Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent f9d8fece
...@@ -1121,6 +1121,7 @@ struct ce_state *ath10k_ce_init(struct ath10k *ar, ...@@ -1121,6 +1121,7 @@ struct ce_state *ath10k_ce_init(struct ath10k *ar,
{ {
struct ce_state *ce_state; struct ce_state *ce_state;
u32 ctrl_addr = ath10k_ce_base_address(ce_id); u32 ctrl_addr = ath10k_ce_base_address(ce_id);
int ret;
ce_state = ath10k_ce_init_state(ar, ce_id, attr); ce_state = ath10k_ce_init_state(ar, ce_id, attr);
if (!ce_state) { if (!ce_state) {
...@@ -1129,18 +1130,20 @@ struct ce_state *ath10k_ce_init(struct ath10k *ar, ...@@ -1129,18 +1130,20 @@ struct ce_state *ath10k_ce_init(struct ath10k *ar,
} }
if (attr->src_nentries) { if (attr->src_nentries) {
if (ath10k_ce_init_src_ring(ar, ce_id, ce_state, attr)) { ret = ath10k_ce_init_src_ring(ar, ce_id, ce_state, attr);
ath10k_err("Failed to initialize CE src ring for ID: %d\n", if (ret) {
ce_id); ath10k_err("Failed to initialize CE src ring for ID: %d (%d)\n",
ce_id, ret);
ath10k_ce_deinit(ce_state); ath10k_ce_deinit(ce_state);
return NULL; return NULL;
} }
} }
if (attr->dest_nentries) { if (attr->dest_nentries) {
if (ath10k_ce_init_dest_ring(ar, ce_id, ce_state, attr)) { ret = ath10k_ce_init_dest_ring(ar, ce_id, ce_state, attr);
ath10k_err("Failed to initialize CE dest ring for ID: %d\n", if (ret) {
ce_id); ath10k_err("Failed to initialize CE dest ring for ID: %d (%d)\n",
ce_id, ret);
ath10k_ce_deinit(ce_state); ath10k_ce_deinit(ce_state);
return NULL; return NULL;
} }
......
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