Skip to content

Commit

Permalink
bcm4329_204/linux_osl.c Compiler error fix when passing -02
Browse files Browse the repository at this point in the history
(In function 'osl_pktfree_static':
error: array subscript is above array bounds)
  • Loading branch information
LeeDrOiD committed May 15, 2011
1 parent 1fab21a commit 0e3632e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/bcm4329_204/linux_osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ osl_pktfree_static(osl_t *osh, void *p, bool send)

for (i = 0; i < MAX_STATIC_PKT_NUM*2; i++)
{
if (p == bcm_static_skb->skb_4k[i])
if ( (i < MAX_STATIC_PKT_NUM && p == bcm_static_skb->skb_4k[i]) ||
(i >= MAX_STATIC_PKT_NUM && p == bcm_static_skb->skb_8k[i-MAX_STATIC_PKT_NUM]) )
{
mutex_lock(&bcm_static_skb->osl_pkt_sem);
bcm_static_skb->pkt_use[i] = 0;
Expand Down

0 comments on commit 0e3632e

Please sign in to comment.