Skip to content

Commit

Permalink
net: honour netif_set_real_num_tx_queues() retval
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jul 20, 2012
1 parent 6f458df commit ee6ae1a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ee6ae1a

Please sign in to comment.