staging: netlogic: Fix checkpatch.pl warning
authorRamon Fried <ramon.fried@gmail.com>
Sun, 31 Aug 2014 20:40:29 +0000 (23:40 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Sep 2014 17:40:03 +0000 (10:40 -0700)
This patch fixes the following checkpatch.pl warning:

WARNING: Possible unnecessary 'out of memory' message
#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>
drivers/staging/netlogic/xlr_net.c

index f8120fe..3f9c5ad 100644 (file)
@@ -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);