nfp: release global resources only on the remove path
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 18 Jan 2018 02:50:56 +0000 (18:50 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Jan 2018 20:44:18 +0000 (15:44 -0500)
commite1a2599db564340f1bee1536177e3dfb2461e75a
tree031cbf1cd0a559a74ce409b3c38fa4bcbafff19b
parentaa3f4b69a794f5ac1bdc501eaf964ce48901836e
nfp: release global resources only on the remove path

NFP app is currently shut down as soon as all the vNICs are gone.
This means we can't depend on the app existing throughout the
lifetime of the device.  Free the app only from PCI remove path.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_main.c