aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax/i2400m/usb-rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wimax/i2400m/usb-rx.c')
-rw-r--r--drivers/net/wimax/i2400m/usb-rx.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wimax/i2400m/usb-rx.c b/drivers/net/wimax/i2400m/usb-rx.c
index 074cc1f89853..a314799967cf 100644
--- a/drivers/net/wimax/i2400m/usb-rx.c
+++ b/drivers/net/wimax/i2400m/usb-rx.c
@@ -184,6 +184,8 @@ void i2400mu_rx_size_maybe_shrink(struct i2400mu *i2400mu)
184 * NOTE: this function might realloc the skb (if it is too small), 184 * NOTE: this function might realloc the skb (if it is too small),
185 * so always update with the one returned. 185 * so always update with the one returned.
186 * ERR_PTR() is < 0 on error. 186 * ERR_PTR() is < 0 on error.
187 * Will return NULL if it cannot reallocate -- this can be
188 * considered a transient retryable error.
187 */ 189 */
188static 190static
189struct sk_buff *i2400mu_rx(struct i2400mu *i2400mu, struct sk_buff *rx_skb) 191struct sk_buff *i2400mu_rx(struct i2400mu *i2400mu, struct sk_buff *rx_skb)
@@ -243,8 +245,8 @@ retry:
243 if (printk_ratelimit()) 245 if (printk_ratelimit())
244 dev_err(dev, "RX: Can't reallocate skb to %d; " 246 dev_err(dev, "RX: Can't reallocate skb to %d; "
245 "RX dropped\n", rx_size); 247 "RX dropped\n", rx_size);
246 kfree(rx_skb); 248 kfree_skb(rx_skb);
247 result = 0; 249 rx_skb = NULL;
248 goto out; /* drop it...*/ 250 goto out; /* drop it...*/
249 } 251 }
250 kfree_skb(rx_skb); 252 kfree_skb(rx_skb);
@@ -344,7 +346,8 @@ int i2400mu_rxd(void *_i2400mu)
344 if (IS_ERR(rx_skb)) 346 if (IS_ERR(rx_skb))
345 goto out; 347 goto out;
346 atomic_dec(&i2400mu->rx_pending_count); 348 atomic_dec(&i2400mu->rx_pending_count);
347 if (rx_skb->len == 0) { /* some ignorable condition */ 349 if (rx_skb == NULL || rx_skb->len == 0) {
350 /* some "ignorable" condition */
348 kfree_skb(rx_skb); 351 kfree_skb(rx_skb);
349 continue; 352 continue;
350 } 353 }