Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EA64C433F5 for ; Wed, 24 Nov 2021 13:41:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351116AbhKXNoq (ORCPT ); Wed, 24 Nov 2021 08:44:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:32976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343711AbhKXNmE (ORCPT ); Wed, 24 Nov 2021 08:42:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F25B76327D; Wed, 24 Nov 2021 12:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637758685; bh=kfxHU8qIo2PZPVzqIxw/GyWJwPHjufvuseYbHck9cJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s9+jzoKgnWiIpoq33FDEaVtRSpjGR7HY3YDSweacI2Oj5Y6Ia5amtlQ16RNvxXp4U IVJVynEx6PfVjn9ONcpdFZLJI6Lu9gPQzOahwLlxS9M64PYKd+aE6Wj/jeCaDGeLGk FBqMdEiEFfFb/QQe9N8MmisnN3OIm+BhTkq1xAdc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leon Romanovsky , "David S. Miller" Subject: [PATCH 5.10 151/154] ice: Delete always true check of PF pointer Date: Wed, 24 Nov 2021 12:59:07 +0100 Message-Id: <20211124115707.365131663@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115702.361983534@linuxfoundation.org> References: <20211124115702.361983534@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/ice/ice_main.c | 3 --- 1 file changed, 3 deletions(-) --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -4361,9 +4361,6 @@ static void ice_remove(struct pci_dev *p 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;