Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130143
b: refs/heads/master
c: f4895b8
h: refs/heads/master
i:
  130141: af26bbf
  130139: 3f587ce
  130135: 7bac799
  130127: 819327d
  130111: 809068d
v: v3
  • Loading branch information
Inaky Perez-Gonzalez authored and David S. Miller committed Jan 20, 2009
1 parent f6160f2 commit ddb81a7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe65e704534de5d0661ebc3466a2b9018945f694
refs/heads/master: f4895b8bc83a22a36446c4aee277e1750fcc6a18
2 changes: 1 addition & 1 deletion trunk/drivers/net/wimax/i2400m/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ void i2400m_msg_to_dev_cancel_wait(struct i2400m *i2400m, int code)
spin_lock_irqsave(&i2400m->rx_lock, flags);
ack_skb = i2400m->ack_skb;
if (ack_skb && !IS_ERR(ack_skb))
kfree(ack_skb);
kfree_skb(ack_skb);
i2400m->ack_skb = ERR_PTR(code);
spin_unlock_irqrestore(&i2400m->rx_lock, flags);
}
Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/net/wimax/i2400m/usb-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ void i2400mu_rx_size_maybe_shrink(struct i2400mu *i2400mu)
* NOTE: this function might realloc the skb (if it is too small),
* so always update with the one returned.
* ERR_PTR() is < 0 on error.
* Will return NULL if it cannot reallocate -- this can be
* considered a transient retryable error.
*/
static
struct sk_buff *i2400mu_rx(struct i2400mu *i2400mu, struct sk_buff *rx_skb)
Expand Down Expand Up @@ -243,8 +245,8 @@ struct sk_buff *i2400mu_rx(struct i2400mu *i2400mu, struct sk_buff *rx_skb)
if (printk_ratelimit())
dev_err(dev, "RX: Can't reallocate skb to %d; "
"RX dropped\n", rx_size);
kfree(rx_skb);
result = 0;
kfree_skb(rx_skb);
rx_skb = NULL;
goto out; /* drop it...*/
}
kfree_skb(rx_skb);
Expand Down Expand Up @@ -344,7 +346,8 @@ int i2400mu_rxd(void *_i2400mu)
if (IS_ERR(rx_skb))
goto out;
atomic_dec(&i2400mu->rx_pending_count);
if (rx_skb->len == 0) { /* some ignorable condition */
if (rx_skb == NULL || rx_skb->len == 0) {
/* some "ignorable" condition */
kfree_skb(rx_skb);
continue;
}
Expand Down

0 comments on commit ddb81a7

Please sign in to comment.