drivers/net: accept removing device without any port
authorThomas Monjalon <thomas@monjalon.net>
Mon, 28 Sep 2020 23:14:30 +0000 (01:14 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 30 Sep 2020 17:19:14 +0000 (19:19 +0200)
commit68f578bf9bf87ed72447054e0b49928d82b55689
treeff145c252ef3e09801ee375c1080bb1e7d5e54d7
parentfbd1913561484b58e155fbefea4e15491ed60c9f
drivers/net: accept removing device without any port

The ports can be closed (i.e. completely released)
before removing the whole device.
Such case was wrongly considered an error by some drivers.

If the device supports only one port, there is nothing much
to free after the port is closed.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Rosen Xu <rosen.xu@intel.com>
Reviewed-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
drivers/net/ipn3ke/ipn3ke_ethdev.c
drivers/net/kni/rte_eth_kni.c
drivers/net/netvsc/hn_ethdev.c
drivers/net/nfp/nfp_net.c
drivers/net/szedata2/rte_eth_szedata2.c