]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Move max_width check up before count check
authorJiri Pirko <jiri@mellanox.com>
Thu, 31 Oct 2019 09:42:09 +0000 (11:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Oct 2019 17:54:46 +0000 (10:54 -0700)
commita8cc46ca27631ee5f80187541de20cb0d76bb70a
tree6709ad4e99e02f8696c246626ed1d2c69f990e1c
parent494841fb0a9195a06fd9877abe793ba576b4ad9a
mlxsw: spectrum: Move max_width check up before count check

The fact that the port cannot be split further should be checked before
checking the count, so move it.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Shalom Toledo <shalomt@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c