Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1639418pxy; Mon, 2 Aug 2021 06:51:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyM+pumnCARnb4WSa6XQpQVgXks33CkvEycH1lMxNyGXaZHYddix191vzXvPiGIuWmZZw5O X-Received: by 2002:a92:cb06:: with SMTP id s6mr1987124ilo.87.1627912293799; Mon, 02 Aug 2021 06:51:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912293; cv=none; d=google.com; s=arc-20160816; b=HBZk/hWus4WVEnotry1I3XbCfthdiGblAIqKR9FkjYNSsPZ4uX9LN23muE1SSDBDon 8pi4P0GO+neeJvZrYOfcBsu4VTEI8+S23Z3dnKJ2TJQPX8+vl9FuIurG+6oIvFR2M24L pFTuY6Pjrb62W919WPItmKNFCwlT5B5uvDcOEeUbtTh6h0sAh6AJulHcUqeQgM4Kl/8S XcfyD4MiXk4mCqHgaCsNlLkMv5bcfOe52WYs0EC6rrAvRU9VGB8f3hno1Hhy//568/y8 NRj90ZyqAuL3PZcAcPAkJilFw4QgAqMARIFSBjVyCRQ6jlx+47mF30nFyDUD6FeMMcJ/ MFgw== 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=EfzfciDq8ZdQsyHW4cBxsqQKU3dITsX+5tTs9D2Id54=; b=ChBaEXY57FhBadlPsfU0iMK8gNycG7B7SG9kXHJ0fSTqGxvuZJNaVZR9+s3bUO8aRE GLsJQvg6t5JSu4ViVRZihZpl4GK75lh9u2plkJRR+tlBeCUFqaLJVywk2ZKLX/FRN4Sj gIqlDsqzfcQhBqNb2rAeRW2iqLMh0mz8AsMb2Z5BscJDbRwBfgwaPy7eGtG4I3hWjSc1 Ydbmu5QimVpZ5J3pV3FWeftcYZ+T91lA0Q3NVhBIlXyfQuWyO4qZFQxvIHHmZ6vml93x cVOXXx1oTJNbh44o6pC+HP4V4wxIIKe/9niCQxn3bsWtHi90PYapgagCAey0bTGIC0F4 eDUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DlTR3hzO; 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 y7si11645021ila.59.2021.08.02.06.51.20; Mon, 02 Aug 2021 06:51:33 -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=DlTR3hzO; 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 S234714AbhHBNut (ORCPT + 99 others); Mon, 2 Aug 2021 09:50:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:57194 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234308AbhHBNr4 (ORCPT ); Mon, 2 Aug 2021 09:47:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B4D77610A2; Mon, 2 Aug 2021 13:47:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912063; bh=lJJQb3opEo1SmYmVPYajoRrl2ARLl5FSD7TitZQMThM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DlTR3hzOifw52Zx79G0mtZjFm+N3H8qbmyzZjPv8+ti7wUbNsRfhfEyhtuH94F8NJ X5rhousSPKfXIPMSRjjckZJbRzHarYYNmUbhObmoMx++75AdhL+3XYdKsJEIOOb7Tt 7zkzhSpyAJ4BPG1PhVEymBKr3ix02CCzNgAoU81w= 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 4.9 31/32] tulip: windbond-840: Fix missing pci_disable_device() in probe and remove Date: Mon, 2 Aug 2021 15:44:51 +0200 Message-Id: <20210802134333.909711653@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134332.931915241@linuxfoundation.org> References: <20210802134332.931915241@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 1f62b9423851..31dfb695eded 100644 --- a/drivers/net/ethernet/dec/tulip/winbond-840.c +++ b/drivers/net/ethernet/dec/tulip/winbond-840.c @@ -368,7 +368,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); @@ -390,7 +390,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)); @@ -469,8 +469,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; @@ -1537,7 +1535,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