summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-05-22 08:03:17 +0200
committerMarcel Holtmann <marcel@holtmann.org>2017-05-22 10:26:57 +0200
commit3a21bf586dd012e82abbd4dcedafdfa991f02fa3 (patch)
tree5344ec569a67f95ac538ab0916edc402bbc25f67
parent8ec4a1e950edd29075c5316dc68e83faf69904d6 (diff)
downloadlinux-3a21bf586dd012e82abbd4dcedafdfa991f02fa3.tar.bz2
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: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--drivers/net/ieee802154/ca8210.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index 25ed11bb5ed3..f6df75e80a60 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -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 */