All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Chen <wangchen@cn.fujitsu.com>
To: jeff@garzik.org
Cc: Stephen Hemminger <shemminger@vyatta.com>,
	NETDEV <netdev@vger.kernel.org>
Subject: [PATCH] skge: Fix skge_set_ring_param() losing error return
Date: Fri, 26 Sep 2008 16:32:50 +0800	[thread overview]
Message-ID: <48DC9E32.503@cn.fujitsu.com> (raw)

From: Wang Chen <wangchen@cn.fujitsu.com>
Date: Fri, 26 Sep 2008 16:20:32 +0800
Subject: [PATCH] skge: Fix skge_set_ring_param() losing error return

The error return is useful to caller, driver shouldn't miss it.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
---
 drivers/net/skge.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 2e26dce..4c333a1 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -494,7 +494,7 @@ static int skge_set_ring_param(struct net_device *dev,
 			       struct ethtool_ringparam *p)
 {
 	struct skge_port *skge = netdev_priv(dev);
-	int err;
+	int err = 0;
 
 	if (p->rx_pending == 0 || p->rx_pending > MAX_RX_RING_SIZE ||
 	    p->tx_pending < TX_LOW_WATER || p->tx_pending > MAX_TX_RING_SIZE)
@@ -510,7 +510,7 @@ static int skge_set_ring_param(struct net_device *dev,
 			dev_close(dev);
 	}
 
-	return 0;
+	return err;
 }
 
 static u32 skge_get_msglevel(struct net_device *netdev)
-- 
1.5.5.1


                 reply	other threads:[~2008-09-26  8:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=48DC9E32.503@cn.fujitsu.com \
    --to=wangchen@cn.fujitsu.com \
    --cc=jeff@garzik.org \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.