Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1644985pxy; Mon, 2 Aug 2021 07:00:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ8RtiAkJnLEcAaW8nVGjFECia9QPeocjsGwO3vUVASNKid7sHYjhGM7OBBX3M7MWiMS80 X-Received: by 2002:a6b:f919:: with SMTP id j25mr5150753iog.2.1627912815346; Mon, 02 Aug 2021 07:00:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912815; cv=none; d=google.com; s=arc-20160816; b=Dox2r5DpiUUmip8cFJX8COYmv0pOPKoMoXCMtYjWNKkgMCCtg6hv0Gx2UTWta9Eycb QY4r0nvmAKUy5F+tgT7wL6b3M9w/aM6+I6ueOHkZGPdngOsRQPaFTuTI6QdUt2y0Zl7U 1FaWsbEzKcfj6xGnC0oqx8z+uCuDN0TWJVT01VIhms15S+cy7uehouvqVuLJiD8QuVek /+1uQ7MWDeV+xaqTlXH85wVLNQCjvJDsEM14VMCiQk/7tFWKne3ylRsciQMDYE4m34vC ge2YQQiX65isETiNMXv3/rqNZ9E2KgcR5k1H5OiRn+/xUdJUjARz95p+qd+XCzygHWrb PWhg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=B/EUp8yWrJkgKhQd5x9VI9KdBu2GccEvu2sabpHKCQ0=; b=ZYKHw4knFnhtiX3AZZuDwu49kjI2Tc8IJahDf8tFDhn3AEDAPzb2Pp8N8DJB/DyCIh hFCf/YbLLDdcQ6A5Hq6TZ/z4cwAUjPfmiMB0DRYk7j2hv0+F//qMCis5voMMS5nbpH1m if1C/sE+cSLJxDU0ejcLmUUzb8p+PuI1jSRsG2kZVLlypBdjBZqcXQclBudOLCHO9+w6 VVqc7U/nZdKyjlwVNxcncp3mDjqLBZ6gz+Y/602i4HJ9kCPEnBgfwClFEcpy186Ykhj/ 7OwdPgqRiMSnYbyMnK5KAGi0L7Q5g+VRlxvT480Ehmh58uM3UtReOLSrc+jXldaHbtRo fjbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Oe80Sc9Z; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q7si13484079ilu.111.2021.08.02.07.00.02; Mon, 02 Aug 2021 07:00:15 -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=@linuxfoundation.org header.s=korg header.b=Oe80Sc9Z; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235833AbhHBN6l (ORCPT + 99 others); Mon, 2 Aug 2021 09:58:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:33052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234792AbhHBNwF (ORCPT ); Mon, 2 Aug 2021 09:52:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E3BDE610FD; Mon, 2 Aug 2021 13:51:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912291; bh=9s0+jIRRx+lf0HGF/rUXYbRC0k0MzN9myWE59gt82XA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Oe80Sc9Z7PPRUPehLFqInQ/i1WNJbt6ZhsgQmqw/wWoimUDb/CEcnCFU0WfqYl0kh a2ADFUxz/cgbkLjCruPGSHrV89CvA+RJk60F3ctUo52VeIqWtWoKhL3VVSAxz+TTR3 x6S6IbNUwoIInI1nvhwvu3c0Cc0Q86bVkubn0JW0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Wang Hai , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 33/40] tulip: windbond-840: Fix missing pci_disable_device() in probe and remove Date: Mon, 2 Aug 2021 15:45:13 +0200 Message-Id: <20210802134336.443810996@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134335.408294521@linuxfoundation.org> References: <20210802134335.408294521@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: Wang Hai [ Upstream commit 76a16be07b209a3f507c72abe823bd3af1c8661a ] Replace pci_enable_device() with pcim_enable_device(), pci_disable_device() and pci_release_regions() will be called in release automatically. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/dec/tulip/winbond-840.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/winbond-840.c b/drivers/net/ethernet/dec/tulip/winbond-840.c index 70cb2d689c2c..79bdd2a79dbd 100644 --- a/drivers/net/ethernet/dec/tulip/winbond-840.c +++ b/drivers/net/ethernet/dec/tulip/winbond-840.c @@ -367,7 +367,7 @@ static int w840_probe1(struct pci_dev *pdev, const struct pci_device_id *ent) int i, option = find_cnt < MAX_UNITS ? options[find_cnt] : 0; void __iomem *ioaddr; - i = pci_enable_device(pdev); + i = pcim_enable_device(pdev); if (i) return i; pci_set_master(pdev); @@ -389,7 +389,7 @@ static int w840_probe1(struct pci_dev *pdev, const struct pci_device_id *ent) ioaddr = pci_iomap(pdev, TULIP_BAR, netdev_res_size); if (!ioaddr) - goto err_out_free_res; + goto err_out_netdev; for (i = 0; i < 3; i++) ((__le16 *)dev->dev_addr)[i] = cpu_to_le16(eeprom_read(ioaddr, i)); @@ -468,8 +468,6 @@ static int w840_probe1(struct pci_dev *pdev, const struct pci_device_id *ent) err_out_cleardev: pci_iounmap(pdev, ioaddr); -err_out_free_res: - pci_release_regions(pdev); err_out_netdev: free_netdev (dev); return -ENODEV; @@ -1535,7 +1533,6 @@ static void w840_remove1(struct pci_dev *pdev) if (dev) { struct netdev_private *np = netdev_priv(dev); unregister_netdev(dev); - pci_release_regions(pdev); pci_iounmap(pdev, np->base_addr); free_netdev(dev); } -- 2.30.2