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

Commit 3a21bf58 authored by Markus Elfring's avatar Markus Elfring Committed by Marcel Holtmann
Browse files

ieee802154: ca8210: Delete an error message for a failed memory allocation in ca8210_skb_rx()

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf


Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 8ec4a1e9
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1808,10 +1808,9 @@ static int ca8210_skb_rx(

	/* Allocate mtu size buffer for every rx packet */
	skb = dev_alloc_skb(IEEE802154_MTU + sizeof(hdr));
	if (!skb) {
		dev_crit(&priv->spi->dev, "dev_alloc_skb failed\n");
	if (!skb)
		return -ENOMEM;
	}

	skb_reserve(skb, sizeof(hdr));

	msdulen = data_ind[22]; /* msdu_length */