aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2012-07-19 22:28:46 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-20 14:06:59 -0400
commitee6ae1a1d58c70fc864bc777a36be56b0880ebff (patch)
treee390393a3169b496d3a0db106139770004434b4b /include
parent6f458dfb409272082c9bfa412f77ff2fc21c626f (diff)
net: honour netif_set_real_num_tx_queues() retval
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ab0251d541ab..eb06e58bed0b 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,
2110static inline int netif_copy_real_num_queues(struct net_device *to_dev, 2110static inline int netif_copy_real_num_queues(struct net_device *to_dev,
2111 const struct net_device *from_dev) 2111 const struct net_device *from_dev)
2112{ 2112{
2113 netif_set_real_num_tx_queues(to_dev, from_dev->real_num_tx_queues); 2113 int err;
2114
2115 err = netif_set_real_num_tx_queues(to_dev,
2116 from_dev->real_num_tx_queues);
2117 if (err)
2118 return err;
2114#ifdef CONFIG_RPS 2119#ifdef CONFIG_RPS
2115 return netif_set_real_num_rx_queues(to_dev, 2120 return netif_set_real_num_rx_queues(to_dev,
2116 from_dev->real_num_rx_queues); 2121 from_dev->real_num_rx_queues);