]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
net: ena: remove superfluous check in ena_remove()
authorLino Sanfilippo <LinoSanfilippo@gmx.de>
Sat, 18 Feb 2017 11:19:41 +0000 (12:19 +0100)
committerKamal Mostafa <kamal@canonical.com>
Mon, 10 Jul 2017 17:31:40 +0000 (10:31 -0700)
BugLink: http://bugs.launchpad.net/bugs/1701575
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>
(cherry picked from commit 90a6c997bd8bb836809eda5efb6406d8c58c0924)
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
drivers/net/ethernet/amazon/ena/ena_netdev.c

index fca8d51d0f91ee707c7b684dac66d6f9782f8d46..cd592456ecf33bc5eb75bed60255152be1f77243 100644 (file)
@@ -3165,12 +3165,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;