aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda/via-ircc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/irda/via-ircc.c')
-rw-r--r--drivers/net/irda/via-ircc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c
index 79b85f327500..d916e1257c47 100644
--- a/drivers/net/irda/via-ircc.c
+++ b/drivers/net/irda/via-ircc.c
@@ -1223,8 +1223,13 @@ static int upload_rxdata(struct via_ircc_cb *self, int iobase)
1223 1223
1224 IRDA_DEBUG(2, "%s(): len=%x\n", __FUNCTION__, len); 1224 IRDA_DEBUG(2, "%s(): len=%x\n", __FUNCTION__, len);
1225 1225
1226 if ((len - 4) < 2) {
1227 self->stats.rx_dropped++;
1228 return FALSE;
1229 }
1230
1226 skb = dev_alloc_skb(len + 1); 1231 skb = dev_alloc_skb(len + 1);
1227 if ((skb == NULL) || ((len - 4) < 2)) { 1232 if (skb == NULL) {
1228 self->stats.rx_dropped++; 1233 self->stats.rx_dropped++;
1229 return FALSE; 1234 return FALSE;
1230 } 1235 }