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

Commit 363f149c authored by Raja Mani's avatar Raja Mani Committed by Kalle Valo
Browse files

ath6kl: Check for valid endpoint ID values in ath6kl_control_tx()



It's safe to check endpoint id values before it get
really used. Found this on code review.

Signed-off-by: default avatarRaja Mani <rmani@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent d54601b9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -293,6 +293,12 @@ int ath6kl_control_tx(void *devt, struct sk_buff *skb,
		return -EACCES;
	}

	if (WARN_ON_ONCE(eid == ENDPOINT_UNUSED ||
			 eid >= ENDPOINT_MAX)) {
		status = -EINVAL;
		goto fail_ctrl_tx;
	}

	spin_lock_bh(&ar->lock);

	ath6kl_dbg(ATH6KL_DBG_WLAN_TX,