Netdev List
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: netdev@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] net: systemport: Delete an error message for a failed memory allocation in two functions
Date: Mon, 1 Jan 2018 17:54:07 +0100	[thread overview]
Message-ID: <5852a936-de6d-f292-2791-b8469b5f8947@users.sourceforge.net> (raw)

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 1 Jan 2018 17:50:02 +0100

Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/net/ethernet/broadcom/bcmsysport.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index 9d7a834c5f62..34e6ddde89e1 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -1396,7 +1396,6 @@ static int bcm_sysport_init_tx_ring(struct bcm_sysport_priv *priv,
 	if (!ring->cbs) {
 		dma_free_coherent(kdev, sizeof(struct dma_desc),
 				  ring->desc_cpu, ring->desc_dma);
-		netif_err(priv, hw, priv->netdev, "CB allocation failed\n");
 		return -ENOMEM;
 	}
 
@@ -1576,10 +1575,8 @@ static int bcm_sysport_init_rx_ring(struct bcm_sysport_priv *priv)
 	priv->rx_read_ptr = 0;
 	priv->rx_cbs = kcalloc(priv->num_rx_bds, sizeof(struct bcm_sysport_cb),
 				GFP_KERNEL);
-	if (!priv->rx_cbs) {
-		netif_err(priv, hw, priv->netdev, "CB allocation failed\n");
+	if (!priv->rx_cbs)
 		return -ENOMEM;
-	}
 
 	for (i = 0; i < priv->num_rx_bds; i++) {
 		cb = priv->rx_cbs + i;
-- 
2.15.1

             reply	other threads:[~2018-01-01 16:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-01 16:54 SF Markus Elfring [this message]
2018-01-02 22:22 ` [PATCH] net: systemport: Delete an error message for a failed memory allocation in two functions Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5852a936-de6d-f292-2791-b8469b5f8947@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=f.fainelli@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox