Message ID | 1449188994-64940-2-git-send-email-jeffrey.t.kirsher@intel.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
On Thu, 2015-12-03 at 16:29 -0800, Jeff Kirsher wrote: > From: Nick <xerofoify@gmail.com> I guess this is an OK patch, but the From line isn't correct (missing full name) and the changelog is nigh on unreadable. > This fixes the function fm10k_setup_tc to properly check if the > calls to either the function fm10k_init_queueing_scheme or the > function fm10k_mbx_request_irq fail by returning a error code to > signal that the call to either function has failed. Furthermore > if this arises exit immediately from the function fm10k_setup_tc > by returning the returned error code from the failed function call > to signal to the caller that setting up the tc on the device has > failed and the caller needs to handle this failed setup. Maybe something like: Add error handling in fm10k_setup_tc of fm10k_init_queueing_scheme and fm10k_mbx_request_irq. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c index 639263d..96364c7 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c @@ -1149,6 +1149,7 @@ static struct rtnl_link_stats64 *fm10k_get_stats64(struct net_device *netdev, int fm10k_setup_tc(struct net_device *dev, u8 tc) { struct fm10k_intfc *interface = netdev_priv(dev); + int err; /* Currently only the PF supports priority classes */ if (tc && (interface->hw.mac.type != fm10k_mac_pf)) @@ -1173,9 +1174,13 @@ int fm10k_setup_tc(struct net_device *dev, u8 tc) netdev_reset_tc(dev); netdev_set_num_tc(dev, tc); - fm10k_init_queueing_scheme(interface); + err = fm10k_init_queueing_scheme(interface); + if (err) + return err; - fm10k_mbx_request_irq(interface); + err = fm10k_mbx_request_irq(interface); + if (err) + return err; if (netif_running(dev)) fm10k_open(dev);