diff options
author | Stefan Assmann <sassmann@kpanic.de> | 2019-09-03 08:08:10 +0200 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2019-09-11 09:10:46 -0700 |
commit | 8ad2e298294766930e34677ee51b159da31e3898 (patch) | |
tree | f01c0c52bc1e3703f3fcbb40e8ee25b220b8eb0d /drivers/net/ethernet/intel/i40e | |
parent | 846fcc7841de6418109d7ae06e75c01a43ee8a03 (diff) | |
download | linux-8ad2e298294766930e34677ee51b159da31e3898.tar.gz linux-8ad2e298294766930e34677ee51b159da31e3898.tar.bz2 linux-8ad2e298294766930e34677ee51b159da31e3898.zip |
i40e: clear __I40E_VIRTCHNL_OP_PENDING on invalid min Tx rate
In the case of an invalid min Tx rate being requested
i40e_ndo_set_vf_bw() immediately returns -EINVAL instead of releasing
__I40E_VIRTCHNL_OP_PENDING first.
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index f8aa4deceb5e..3d2440838822 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -4263,7 +4263,8 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int min_tx_rate, if (min_tx_rate) { dev_err(&pf->pdev->dev, "Invalid min tx rate (%d) (greater than 0) specified for VF %d.\n", min_tx_rate, vf_id); - return -EINVAL; + ret = -EINVAL; + goto error; } vf = &pf->vf[vf_id]; |