Skip to contentSkip to conversation

bcm63xx_enet: Delete two error messages for a failed memory allocation in bcm_enetsw_open()

PATCH New SF Markus Elfring 1 participant 1 message Jan 1, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bcm63xx_enet: Delete two error messages for a failed memory allocation in bcm_enetsw_open()

From: Markus Elfring <[email protected]>
Date: Mon, 1 Jan 2018 17:30:04 +0100

Omit extra messages for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

---
 drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/broadcom/bcm63xx_enet.c +0 -2
index d9346e2ac720..52a42e3058cf 100644
@@ -2166,7 +2166,6 @@ static int bcm_enetsw_open(struct net_device *dev)
 	priv->tx_skb = kzalloc(sizeof(struct sk_buff *) * priv->tx_ring_size,
 			       GFP_KERNEL);
 	if (!priv->tx_skb) {
-		dev_err(kdev, "cannot allocate rx skb queue\n");
 		ret = -ENOMEM;
 		goto out_free_tx_ring;
 	}
@@ -2180,7 +2179,6 @@ static int bcm_enetsw_open(struct net_device *dev)
 	priv->rx_skb = kzalloc(sizeof(struct sk_buff *) * priv->rx_ring_size,
 			       GFP_KERNEL);
 	if (!priv->rx_skb) {
-		dev_err(kdev, "cannot allocate rx skb queue\n");
 		ret = -ENOMEM;
 		goto out_free_tx_skb;
 	}
Signature · 1 line
2.15.1