]> git.dujemihanovic.xyz Git - linux.git/commitdiff
ionic: drop useless check of PCI driver data validity
authorLeon Romanovsky <leonro@nvidia.com>
Wed, 21 Jul 2021 09:54:13 +0000 (12:54 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Jul 2021 16:03:07 +0000 (09:03 -0700)
The driver core will call to .remove callback only if .probe succeeded
and it will ensure that driver data has pointer to struct ionic.

There is no need to check it again.

Fixes: fbfb8031533c ("ionic: Add hardware init and device commands")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Acked-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c

index e4a5416adc801317eec868522f1f220e1d39ef9b..505f605fa40bb413e65793afc25b2d61b32713d3 100644 (file)
@@ -373,9 +373,6 @@ static void ionic_remove(struct pci_dev *pdev)
 {
        struct ionic *ionic = pci_get_drvdata(pdev);
 
-       if (!ionic)
-               return;
-
        del_timer_sync(&ionic->watchdog_timer);
 
        if (ionic->lif) {