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

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.pdfSigned-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 8ec4a1e9
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment