Skip to contentSkip to conversation

staging: netlogic: Fix checkpatch.pl warning

PATCH New Ramon Fried 1 participant 1 message Aug 31, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: netlogic: Fix checkpatch.pl warning

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");

---
 drivers/staging/netlogic/xlr_net.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/netlogic/xlr_net.c +1 -3
index f8120fe..3f9c5ad 100644
@@ -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);
Signature · 1 line
1.9.1