net: ena: fix potential double ena_destroy_device()
authorNetanel Belgazal <netanel@amazon.com>
Sun, 9 Sep 2018 08:15:23 +0000 (08:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 9 Sep 2018 14:59:55 +0000 (07:59 -0700)
commitfe870c77efdf8682252545cbd3d29800d8379efc
treea4eea30f5fbaf240b6527854d960a723e2abeb3d
parentcfa324a514233b28a6934de619183eee941f02d7
net: ena: fix potential double ena_destroy_device()

ena_destroy_device() can potentially be called twice.
To avoid this, check that the device is running and
only then proceed destroying it.

Signed-off-by: Netanel Belgazal <netanel@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_netdev.c