mlxsw: switchx2: Move port used check outside port remove function
authorJiri Pirko <jiri@mellanox.com>
Fri, 28 Oct 2016 19:35:48 +0000 (21:35 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 30 Oct 2016 20:50:17 +0000 (16:50 -0400)
commitadc4e04a4bbd7696c9aa99eec951ddaf26ac27e1
treebe7a7fb5b8bcfb46c62000e6384b6ba87a6118f4
parentabc1de256c1987fe42eff80d95946ee9452bcac7
mlxsw: switchx2: Move port used check outside port remove function

Be symmentrical with create and do the check outside the remove function.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Elad Raz <eladr@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/switchx2.c