Skip to content

Commit 8ad2e29

Browse files
sassmannJeff Kirsher
authored andcommitted
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 <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 846fcc7 commit 8ad2e29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4263,7 +4263,8 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int min_tx_rate,
42634263
if (min_tx_rate) {
42644264
dev_err(&pf->pdev->dev, "Invalid min tx rate (%d) (greater than 0) specified for VF %d.\n",
42654265
min_tx_rate, vf_id);
4266-
return -EINVAL;
4266+
ret = -EINVAL;
4267+
goto error;
42674268
}
42684269

42694270
vf = &pf->vf[vf_id];

0 commit comments

Comments
 (0)