OSDN Git Service

ice: Delete always true check of PF pointer
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 23 Sep 2021 18:12:52 +0000 (21:12 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Sep 2021 13:12:57 +0000 (14:12 +0100)
PF pointer is always valid when PCI core calls its .shutdown() and
.remove() callbacks. There is no need to check it again.

Fixes: 837f08fdecbe ("ice: Add basic driver framework for Intel(R) E800 Series")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/ice/ice_main.c

index 34e6453..aacc0b3 100644 (file)
@@ -4593,9 +4593,6 @@ static void ice_remove(struct pci_dev *pdev)
        struct ice_pf *pf = pci_get_drvdata(pdev);
        int i;
 
-       if (!pf)
-               return;
-
        for (i = 0; i < ICE_MAX_RESET_WAIT; i++) {
                if (!ice_is_reset_in_progress(pf->state))
                        break;