mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
net/mlx5e: Remove unnecessary checks when setting num channels
Boundaries checks for the number of RX and TX should be checked by the caller and not in the driver. Signed-off-by: Eran Ben Elisha <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
1 parent
e91ef71dfe
commit
639e9e9416
1 file changed
-10
@@ -554,16 +554,6 @@ static int mlx5e_set_channels(struct net_device *dev,
|
||||
__func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (ch->rx_count || ch->tx_count) {
|
||||
netdev_info(dev, "%s: separate rx/tx count not supported\n",
|
||||
__func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (count > ncv) {
|
||||
netdev_info(dev, "%s: count (%d) > max (%d)\n",
|
||||
__func__, count, ncv);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (priv->params.num_channels == count)
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user