diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-02-28 08:45:47 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-03-07 01:25:48 +0400 |
commit | f6baf153eec3cd195589b7cfe32b4ea62d8ec9d1 (patch) | |
tree | c7f98152d42dd4e7c65996ecb190b47da1c8cf9e /drivers/net/wireless/ath/ath6kl | |
parent | 6f56b06e74e2805577bf7940dc0fb17b3310d6b6 (diff) | |
download | linux-f6baf153eec3cd195589b7cfe32b4ea62d8ec9d1.tar.xz |
ath6kl: small cleanup in ath6kl_htc_pipe_rx_complete()
It's harmless, but Smatch complains if we use "htc_hdr->eid" before
doing the bounds check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/htc_pipe.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/htc_pipe.c b/drivers/net/wireless/ath/ath6kl/htc_pipe.c index 281390178e3d..9adb56741bc3 100644 --- a/drivers/net/wireless/ath/ath6kl/htc_pipe.c +++ b/drivers/net/wireless/ath/ath6kl/htc_pipe.c @@ -988,8 +988,6 @@ static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb, htc_hdr = (struct htc_frame_hdr *) netdata; - ep = &target->endpoint[htc_hdr->eid]; - if (htc_hdr->eid >= ENDPOINT_MAX) { ath6kl_dbg(ATH6KL_DBG_HTC, "HTC Rx: invalid EndpointID=%d\n", @@ -997,6 +995,7 @@ static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb, status = -EINVAL; goto free_skb; } + ep = &target->endpoint[htc_hdr->eid]; payload_len = le16_to_cpu(get_unaligned(&htc_hdr->payld_len)); |