Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05f7de67 authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann
Browse files

mac802154: rx: add error handling after skb_clone



This patch adds error handling after skb_clone and deliver only if
skb_clone was successful.

Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 20b48120
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -240,14 +240,15 @@ ieee802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb)
			continue;

		skb2 = skb_clone(skb, GFP_ATOMIC);
		if (skb2) {
			skb2->dev = sdata->dev;

			ieee802154_deliver_skb(skb2);

			sdata->dev->stats.rx_packets++;
			sdata->dev->stats.rx_bytes += skb->len;
		}
	}
}

void ieee802154_rx(struct ieee802154_hw *hw, struct sk_buff *skb)
{