Skip to content

Commit

Permalink
ath6kl: small cleanup in ath6kl_htc_pipe_rx_complete()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and John W. Linville committed Mar 6, 2013
1 parent 6f56b06 commit f6baf15
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/ath/ath6kl/htc_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,15 +988,14 @@ 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",
htc_hdr->eid);
status = -EINVAL;
goto free_skb;
}
ep = &target->endpoint[htc_hdr->eid];

payload_len = le16_to_cpu(get_unaligned(&htc_hdr->payld_len));

Expand Down

0 comments on commit f6baf15

Please sign in to comment.