On 09/20/2012 09:21 AM, rmani@xxxxxxxxxxxxxxxx wrote: > From: Raja Mani <rmani@xxxxxxxxxxxxxxxx> > > It's safe to check endpoint id values before it get > really used. Found this on code review. > > Signed-off-by: Raja Mani <rmani@xxxxxxxxxxxxxxxx> > --- > drivers/net/wireless/ath/ath6kl/txrx.c | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c > index e867193..4ea6559 100644 > --- a/drivers/net/wireless/ath/ath6kl/txrx.c > +++ b/drivers/net/wireless/ath/ath6kl/txrx.c > @@ -294,6 +294,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; > + } Indentation for the line starting with eid doesn't look right (or my thunderbird is corrupting it again). But I can fix it up when I commit the patch. (I assume you will send v2 of this patchset.) Kalle -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html