From patchwork Thu Sep 23 18:12:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 12513487 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91E7BC433F5 for ; Thu, 23 Sep 2021 18:13:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78AE4610C8 for ; Thu, 23 Sep 2021 18:13:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242695AbhIWSPI (ORCPT ); Thu, 23 Sep 2021 14:15:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:39552 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242711AbhIWSOv (ORCPT ); Thu, 23 Sep 2021 14:14:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9B13F61211; Thu, 23 Sep 2021 18:13:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632420799; bh=jwrL23NbCo2fsm514Iz5xIfaNN+I2B1pwpVoLvCR6TI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hqK4EjhPz3dvY3xJm/awyd9QJ6c+1DSwBOJp8FO+vKbRtw3RaEgqoqjr/tan5lpfk rIJdAf0U0FDjGvaZfpV5+OimJrS7e9+vyi/ZFl9fvlscuHKGEEXDYR7aiu9vqMj0+7 aioSEAu1XkXpaAZ3Me++nEoAJs9I3XndjgG1LER+QZYQm7dJy8GDLF/0O4GHgRUZWb L5oHsMkRgRoQSgsFUoaJBQxuORLgjWHsr1INekH1rC9Bu0oB6w3MvvuZUaxid6AFRT GrCWLfysdWtvDS+ihvjy3w1pnlwv1uvSoV0CrVqRJCYxICLvYYkTwB01cLXwlvNKls 3aWJocAOiUBUw== From: Leon Romanovsky To: "David S . Miller" , Jakub Kicinski Cc: Leon Romanovsky , Alexander Lobakin , Anirudh Venkataramanan , Ariel Elior , GR-everest-linux-l2@marvell.com, GR-QLogic-Storage-Upstream@marvell.com, Igor Russkikh , intel-wired-lan@lists.osuosl.org, "James E.J. Bottomley" , Javed Hasan , Jeff Kirsher , Jesse Brandeburg , Jiri Pirko , linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, "Martin K. Petersen" , Michael Chan , Michal Kalderon , netdev@vger.kernel.org, Sathya Perla , Saurav Kashyap , Tony Nguyen , Vasundhara Volam Subject: [PATCH net-next 5/6] ice: Delete always true check of PF pointer Date: Thu, 23 Sep 2021 21:12:52 +0300 Message-Id: <1e19cd378b76b891acd4cff122b622fdb0f99ed0.1632420431.git.leonro@nvidia.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Leon Romanovsky 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 --- drivers/net/ethernet/intel/ice/ice_main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 34e64533026a..aacc0b345bbe 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -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;