ice: Delete always true check of PF pointer
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 23 Sep 2021 18:12:52 +0000 (21:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 09:39:21 +0000 (10:39 +0100)
commit 2ff04286a9569675948f39cec2c6ad47c3584633 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/ice/ice_main.c

index 66d92a0cfef353751d607c4943c9a1618b56f207..5b67d24b2b5edbefd5d1e44cca6e0afa686cf923 100644 (file)
@@ -4361,9 +4361,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;