Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5344097pxv; Wed, 21 Jul 2021 03:13:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznsnLiU6gNTMwjTmfUpWz3F9JXLdba8LKn16JHL8vdZtZ2sJelMV2owKs+lJ3shDDRgLwx X-Received: by 2002:a92:d0d2:: with SMTP id y18mr13673586ila.24.1626862402615; Wed, 21 Jul 2021 03:13:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626862402; cv=none; d=google.com; s=arc-20160816; b=esv+oJGoZPyU0CFvstBS8vgPqXvZSbW8PP/BPpHKJgnYRIhkM4qtGvDgvBwZGKrq9t q0rzxnLLcFaxn8tsGBnRoiRpiB8ApR6EO0xCfEoAVe66tWKJDu68ABm9K8d6FKfpvWYT u0ox4DUCZeKQGc7mULAynt9X2ugoIcQicosdJGjO1T4DnvKQS3Iy2juVjy2xheikbt+E fTemHwDKa7TCJAAllu5uyhpxK6q4EZhikCDz3FN+ql8u3pdjkf64hRpe0us9iKl/cQRv R2UdIsDcWqMUp5OXmaSv4S/TIRl0j4SVT0clDMRjrBHX8PyQlEvUVfqNCoMAoZYX3r02 t25g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Ke6XJjy/UizbDPF6X/jtVXnS1jikD8a7j0WCp10kmrw=; b=pgaAdOWEpAU5iXTEzPf25fJbd3GDMZ3D+sDx6Ea12qzA0uxVNH4Akn/fCfQj3c30vN Y34IzEUNzeHreZiVGkPPUXFpM8vhb30ZggfIrq3x278BRo8mtvL15fNjqCLG/X1pLvLq BvkMbknro67rc9n2BXOyFJBRwBowKLzhjrzRse/T7QyjP3xP3ShiqEb6L1v4Db/VBwlm g16AAyCF79xjYOgPgrYu9l0wU7o5ZQf5f+5EW9KwkcgYqDXgNyqdwWfK360PfEqCWnvm 6v1taVeT8Bbh+T+Hsl3gUJqypq9W4/kmfn/y0ZUnMRQA/4ZNl5Dt/M1EtgOt3ZLKhXDi 8tvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BSNx+V08; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l6si14577758ilg.44.2021.07.21.03.13.10; Wed, 21 Jul 2021 03:13:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BSNx+V08; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238570AbhGUJ0u (ORCPT + 99 others); Wed, 21 Jul 2021 05:26:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:43580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238384AbhGUJNn (ORCPT ); Wed, 21 Jul 2021 05:13:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2226461181; Wed, 21 Jul 2021 09:54:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626861258; bh=enKOQeFSPKGFuiBSAofb41ommxAMjY4ME+9EOlVJKwg=; h=From:To:Cc:Subject:Date:From; b=BSNx+V08lATWNIyptIgGG7IFzF2nO4UEOsAA4GipoXj+9JAB0ygBeDjmdtb/rQT5N +ercli1zMsA76AcYvBjk1VHZ0a+ScRAs/Fz/RdbfP7q5rHFOsjxpu6VAmkXIZy0Th6 65vEU7y6xoNy5mFyBPbTK/lgWXqPHdl2YBwRWza60FGE/+x5308Hoey76pG9Ey+ZIH iSgYRa1/IVyNgestYSbuZa7Apu+rWbecnHvLAKVrXYWuyj5/QpO78O9VKoLGuLACvW 4dheMCP4radW1v+TcUNSOgdlPfbkCez+t/hVW8z2W5zDJiYwWC2AgKDuwI0wWORlHc 9Ff6xV94vIVdw== From: Leon Romanovsky To: "David S. Miller" , Jakub Kicinski , Shannon Nelson Cc: Leon Romanovsky , drivers@pensando.io, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH net-next] ionic: drop useless check of PCI driver data validity Date: Wed, 21 Jul 2021 12:54:13 +0300 Message-Id: <93b5b93f83fae371e53069fc27975e59de493a3b.1626861128.git.leonro@nvidia.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky 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 --- drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c index e4a5416adc80..505f605fa40b 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c @@ -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) { -- 2.31.1