net: ena: remove superfluous check in ena_remove()
authorLino Sanfilippo <LinoSanfilippo@gmx.de>
Sat, 18 Feb 2017 11:19:41 +0000 (12:19 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Feb 2017 15:22:59 +0000 (10:22 -0500)
The check in ena_remove() for the pci driver data not being NULL is not
needed, since it is always set in the probe() function. Remove the
superfluous check.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_netdev.c

index d8c920be5e916d2e2d2a1dcf9f35105a24a06d18..35f19430c84ae2dc7ed0e098acbe3516f3e166b5 100644 (file)
@@ -3163,12 +3163,6 @@ static void ena_remove(struct pci_dev *pdev)
        struct ena_com_dev *ena_dev;
        struct net_device *netdev;
 
-       if (!adapter)
-               /* This device didn't load properly and it's resources
-                * already released, nothing to do
-                */
-               return;
-
        ena_dev = adapter->ena_dev;
        netdev = adapter->netdev;