Skip to content

Commit

Permalink
ath6kl: Check for valid endpoint ID in ath6kl_tx_complete()
Browse files Browse the repository at this point in the history
Endpoint ID is checked to make sure it is valid.

Signed-off-by: Pandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Pandiyarajan Pitchaimuthu authored and Kalle Valo committed Oct 24, 2012
1 parent 86aa7c1 commit 3077494
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/wireless/ath/ath6kl/txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,10 @@ void ath6kl_tx_complete(struct htc_target *target,
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;
if (WARN_ON_ONCE(!ath6kl_cookie))
continue;
Expand Down

0 comments on commit 3077494

Please sign in to comment.