summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac802154/rx.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index 971a8553e9b6..95961cccc253 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -240,12 +240,13 @@ ieee802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb)
continue;
skb2 = skb_clone(skb, GFP_ATOMIC);
- skb2->dev = sdata->dev;
+ if (skb2) {
+ skb2->dev = sdata->dev;
+ ieee802154_deliver_skb(skb2);
- ieee802154_deliver_skb(skb2);
-
- sdata->dev->stats.rx_packets++;
- sdata->dev->stats.rx_bytes += skb->len;
+ sdata->dev->stats.rx_packets++;
+ sdata->dev->stats.rx_bytes += skb->len;
+ }
}
}