Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1652040pxy; Mon, 2 Aug 2021 07:07:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxipTIhdzz5nQ3KjdDvOxdyje3GwM3dFXAWlwLMBw4dJKv/pQwkYxJ/zxyUov4/V9rNDbud X-Received: by 2002:a17:906:4c89:: with SMTP id q9mr15479509eju.118.1627913226134; Mon, 02 Aug 2021 07:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627913226; cv=none; d=google.com; s=arc-20160816; b=VVPOmVEOCReJ+i4mktj7C0szh3QXrzg00lCw9B6aouzgCxn3xdZRSO20v7b7eiln0y YZdBSCOotrMLdNFP4mJJ3xvnevDpOVWzTtnfTSPoBwf7pyswTU1LN4ks38hJWd848R0v XgMQXbh5da2DveIRmyh22BW/EznwSXh0Uv0fAGnHZ7iw7E4LJEJgQsRuz+vS8ExrAAMc 7nyTm+bZkq+NiVwZT6fQF5p6UQcxluGEFTF5XZFfoA8rzFGd436IFzVk64BUYnd/Cwv0 rMzcfq272ZA8AdtjR9ZON6iHMz1oPWYYydn7ZmDmXdRT73AOd0NGkgF8Pb/mg7fzNWxx x56g== 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=cATduQ1V4NY0uOL6vqb2XQyKZPmgXE546g/joneUiQk=; b=mDAcGa29tFTD5JKPnZvRrXidKtl/BZ8NG02d96I7reJIRGEkh8g3w4iyTAuihZgMs0 DoSTeULbgvKi6EsHLSvNq792BHsIdY9rz3d31O2zziKjI9HOGtER6BWeFrmc0ykPwAi5 BuNJqbiLu8vt7XTXsuRvwKW2LdqGaegMFx7ZgmaAym7NwJkSctbPXUPw+IZL/UDEWr+k yuiiLiRg8LUpdB0EANRamymnDkxwgQc4iCXfpSlyTZ4UeUzD/nQlxf5OAR4J5fuWKu8N oXlieXq4SNce6ALzXkUhSFrZTRKtvuWH7i8yKdgCZOiitPQy1/E3Gt8fB5PNZ02d3+Rn JxEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uEfNBUJg; 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 f24si8992284ejb.334.2021.08.02.07.06.40; Mon, 02 Aug 2021 07:07:06 -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=uEfNBUJg; 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 S236481AbhHBODD (ORCPT + 99 others); Mon, 2 Aug 2021 10:03:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:40684 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234606AbhHBNzS (ORCPT ); Mon, 2 Aug 2021 09:55:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 331F861184; Mon, 2 Aug 2021 13:53:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912430; bh=u3DG5+c+JoKveGRqZGTlbu75hQaaI2ARiW/VJ+oR/PU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uEfNBUJgsN+5OqSyLgOCh6I3erqhrIqhy3qIq2lqSqJvC3vqoWUo1vCUSyRk0bzqr bRk3Rsn/+n3gIRQEYoDdTYEwkhhHZPpIGIvS1ABn2pb67T+DWEGg7CO1/yjosvYnmz 4aYOmE1naPs+c4AkE7UPOO7szdidfHoHIpVxZJ0M= 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.10 55/67] tulip: windbond-840: Fix missing pci_disable_device() in probe and remove Date: Mon, 2 Aug 2021 15:45:18 +0200 Message-Id: <20210802134340.917900403@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134339.023067817@linuxfoundation.org> References: <20210802134339.023067817@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 89cbdc1f4857..6161e1c604c0 100644 --- a/drivers/net/ethernet/dec/tulip/winbond-840.c +++ b/drivers/net/ethernet/dec/tulip/winbond-840.c @@ -357,7 +357,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); @@ -379,7 +379,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)); @@ -458,8 +458,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; @@ -1526,7 +1524,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