netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, edumazet@google.com, shemminger@vyatta.com,
	fubar@us.ibm.com, andy@greyhouse.net
Subject: [patch net-next 1/6] net: honour netif_set_real_num_tx_queues() retval
Date: Fri, 20 Jul 2012 14:28:46 +0200	[thread overview]
Message-ID: <1342787331-1866-2-git-send-email-jiri@resnulli.us> (raw)
In-Reply-To: <1342787331-1866-1-git-send-email-jiri@resnulli.us>

In netif_copy_real_num_queues() the return value of
netif_set_real_num_tx_queues() should be checked.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 include/linux/netdevice.h |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ab0251d..eb06e58 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2110,7 +2110,12 @@ static inline int netif_set_real_num_rx_queues(struct net_device *dev,
 static inline int netif_copy_real_num_queues(struct net_device *to_dev,
 					     const struct net_device *from_dev)
 {
-	netif_set_real_num_tx_queues(to_dev, from_dev->real_num_tx_queues);
+	int err;
+
+	err = netif_set_real_num_tx_queues(to_dev,
+					   from_dev->real_num_tx_queues);
+	if (err)
+		return err;
 #ifdef CONFIG_RPS
 	return netif_set_real_num_rx_queues(to_dev,
 					    from_dev->real_num_rx_queues);
-- 
1.7.10.4

  reply	other threads:[~2012-07-20 12:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 12:28 [patch net-next 0/6] net: add team multiqueue support and do comple of thing on the way Jiri Pirko
2012-07-20 12:28 ` Jiri Pirko [this message]
2012-07-20 12:28 ` [patch net-next 2/6] rtnl: allow to specify different num for rx and tx queue count Jiri Pirko
2012-07-20 12:28 ` [patch net-next 3/6] rtnl: allow to specify number of rx and tx queues on device creation Jiri Pirko
2012-07-20 12:28 ` [patch net-next 4/6] net: rename bond_queue_mapping to slave_dev_queue_mapping Jiri Pirko
2012-07-20 12:28 ` [patch net-next 5/6] bond_sysfs: use ream_num_tx_queues rather than params.tx_queue Jiri Pirko
2012-07-20 15:03   ` Ben Hutchings
2012-07-20 18:04     ` David Miller
2012-07-20 18:09       ` Jiri Pirko
2012-07-20 12:28 ` [patch net-next 6/6] team: add multiqueue support Jiri Pirko
2012-07-20 18:08 ` [patch net-next 0/6] net: add team multiqueue support and do comple of thing on the way David Miller

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=1342787331-1866-2-git-send-email-jiri@resnulli.us \
    --to=jiri@resnulli.us \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fubar@us.ibm.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).