Skip to content

Commit

Permalink
staging: netlogic: Fix checkpatch.pl warning
Browse files Browse the repository at this point in the history
This patch fixes the following checkpatch.pl warning:

WARNING: Possible unnecessary 'out of memory' message
torvalds#116: FILE: ./xlr_net.c:116:
+	if (!skb) {
+		pr_err("SKB allocation failed\n");

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
mellowcandle authored and gregkh committed Sep 2, 2014
1 parent a80f58c commit fdaef43
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/netlogic/xlr_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,8 @@ static inline unsigned char *xlr_alloc_skb(void)

/* skb->data is cache aligned */
skb = alloc_skb(XLR_RX_BUF_SIZE, GFP_ATOMIC);
if (!skb) {
pr_err("SKB allocation failed\n");
if (!skb)
return NULL;
}
skb_data = skb->data;
skb_put(skb, MAC_SKB_BACK_PTR_SIZE);
skb_pull(skb, MAC_SKB_BACK_PTR_SIZE);
Expand Down

0 comments on commit fdaef43

Please sign in to comment.