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

Commit 30774940 authored by Pandiyarajan Pitchaimuthu's avatar Pandiyarajan Pitchaimuthu Committed by Kalle Valo
Browse files

ath6kl: Check for valid endpoint ID in ath6kl_tx_complete()



Endpoint ID is checked to make sure it is valid.

Signed-off-by: default avatarPandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 86aa7c1e
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -704,6 +704,10 @@ void ath6kl_tx_complete(struct htc_target *target,
					  list);
					  list);
		list_del(&packet->list);
		list_del(&packet->list);


		if (WARN_ON_ONCE(packet->endpoint == ENDPOINT_UNUSED ||
				 packet->endpoint >= ENDPOINT_MAX))
			continue;

		ath6kl_cookie = (struct ath6kl_cookie *)packet->pkt_cntxt;
		ath6kl_cookie = (struct ath6kl_cookie *)packet->pkt_cntxt;
		if (WARN_ON_ONCE(!ath6kl_cookie))
		if (WARN_ON_ONCE(!ath6kl_cookie))
			continue;
			continue;