Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d349021 authored by Michal Kazior's avatar Michal Kazior Committed by Kalle Valo
Browse files

ath10k: fix ath10k_ce_init() failpath



Make sure to put target back to sleep. This was a
minor issue as it didn't really matter if we put
target back to sleep at this point. It just looked
wrong.

Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 93e0daa0
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -1077,7 +1077,7 @@ struct ath10k_ce_pipe *ath10k_ce_init(struct ath10k *ar,
	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) {
		ath10k_err("Failed to initialize CE state for ID: %d\n", ce_id);
		ath10k_err("Failed to initialize CE state for ID: %d\n", ce_id);
		return NULL;
		goto out;
	}
	}


	if (attr->src_nentries) {
	if (attr->src_nentries) {
@@ -1086,7 +1086,8 @@ struct ath10k_ce_pipe *ath10k_ce_init(struct ath10k *ar,
			ath10k_err("Failed to initialize CE src ring for ID: %d (%d)\n",
			ath10k_err("Failed to initialize CE src ring for ID: %d (%d)\n",
				   ce_id, ret);
				   ce_id, ret);
			ath10k_ce_deinit(ce_state);
			ath10k_ce_deinit(ce_state);
			return NULL;
			ce_state = NULL;
			goto out;
		}
		}
	}
	}


@@ -1096,15 +1097,16 @@ struct ath10k_ce_pipe *ath10k_ce_init(struct ath10k *ar,
			ath10k_err("Failed to initialize CE dest ring for ID: %d (%d)\n",
			ath10k_err("Failed to initialize CE dest ring for ID: %d (%d)\n",
				   ce_id, ret);
				   ce_id, ret);
			ath10k_ce_deinit(ce_state);
			ath10k_ce_deinit(ce_state);
			return NULL;
			ce_state = NULL;
			goto out;
		}
		}
	}
	}


	/* Enable CE error interrupts */
	/* Enable CE error interrupts */
	ath10k_ce_error_intr_enable(ar, ctrl_addr);
	ath10k_ce_error_intr_enable(ar, ctrl_addr);


out:
	ath10k_pci_sleep(ar);
	ath10k_pci_sleep(ar);

	return ce_state;
	return ce_state;
}
}