Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1645023pxy; Mon, 2 Aug 2021 07:00:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiV9aQ+Txi3VSosOl8cCnCj1bUGaqcMt4Yx83o57DyoVugDhoFnPEeRBOzL31RFJTuZZx9 X-Received: by 2002:a02:5dc5:: with SMTP id w188mr15119656jaa.86.1627912817803; Mon, 02 Aug 2021 07:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912817; cv=none; d=google.com; s=arc-20160816; b=FjbnCUZezeaZvnEzP5aNzqVbuN3Ebh7vqoh/wnvmAibQhjnpTk8IilGxMH6h303Vb4 w0gzNE/O/fAKbw+PJ6PC5ipWZbv2z+V8Pj/a62IAG6RYHbxRJsRwT+LrAS8YkRowP6re FMtsFzjSQaJacS4bQsVWI9jEjXmsp8meedC3/9EuT1gpwonr+o8QsmjVo8UGDZb1NWYM KVQQfU/g8LFTy10K1Hb98ElPdJnHFCrWQkr62PbSKR1uyjWYt2ZE7USPvnTCE71OiwAY 0w1hqd8oNutV/AcTk4TquppP6vPfxBmxh7FphqLugrGYoWHZeOlfgpxipFqFOiK8H7JE lgBw== 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=PVfkzftXC82jLA4mHNtRrMrv/OR8iWy4niWkbHSVQ4I=; b=kcFhRhVh+LeaGm2cAzv53chFXiW0fs67qPXNC/ozk+U48JdBpAsS3ewxmNvlWYsHIr eSqunskE+Tcx6J2Z0X0hSiZ0Ha7xEC7zk3mfFg5L3ALbQrI0nQGQ/znes/rYPG2A9ftM myndp7fiV/7End2G3XMU5/fJ9ovc4uM0iXypJeEDrQ2IK1lHuZnsYnXnPKYmHG58fC3o cx8MDLD6N+2T0Xa/rHo1NnwWZbEdCwC4w7mxCAzeb/GvMKWLG1WMIX4bdOJl3SAC3lh5 ElH2VDwv2mz8gppZPFFrh0rHjOWPuDBola4TXtWo9YpTjSC1P3do5BgZXElD2e1iLjm2 ZhXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="cPMfO1/m"; 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 y18si12382047ily.67.2021.08.02.07.00.06; Mon, 02 Aug 2021 07:00:17 -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="cPMfO1/m"; 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 S234850AbhHBN6r (ORCPT + 99 others); Mon, 2 Aug 2021 09:58:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:34014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235199AbhHBNwQ (ORCPT ); Mon, 2 Aug 2021 09:52:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1AF3161102; Mon, 2 Aug 2021 13:51:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912293; bh=AfShgEao/ztxyxjh1zF7BTomniZiZemLsl7poDjazw0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cPMfO1/mxaLnDFYkBuSQxTUL2hXqIEnYIIt9y+BCrMJ+CORk5tW2rUZEtG7wni9I9 QUBvk3IP1KSGI+Nimamd2ef5y+2hy2A6t0DTuFnP1D0bIlHE9U6C5nHtH31kX3OhWA cUBmbjhDb8gcAkjIdfNYM81AznT93UkA3LFt/WYU= 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 34/40] sis900: Fix missing pci_disable_device() in probe and remove Date: Mon, 2 Aug 2021 15:45:14 +0200 Message-Id: <20210802134336.482132016@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 89fb62fde3b226f99b7015280cf132e2a7438edf ] 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/sis/sis900.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/sis/sis900.c b/drivers/net/ethernet/sis/sis900.c index 44fe2adf0ee0..30990d7a8e40 100644 --- a/drivers/net/ethernet/sis/sis900.c +++ b/drivers/net/ethernet/sis/sis900.c @@ -443,7 +443,7 @@ static int sis900_probe(struct pci_dev *pci_dev, #endif /* setup various bits in PCI command register */ - ret = pci_enable_device(pci_dev); + ret = pcim_enable_device(pci_dev); if(ret) return ret; i = pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32)); @@ -469,7 +469,7 @@ static int sis900_probe(struct pci_dev *pci_dev, ioaddr = pci_iomap(pci_dev, 0, 0); if (!ioaddr) { ret = -ENOMEM; - goto err_out_cleardev; + goto err_out; } sis_priv = netdev_priv(net_dev); @@ -579,8 +579,6 @@ err_unmap_tx: sis_priv->tx_ring_dma); err_out_unmap: pci_iounmap(pci_dev, ioaddr); -err_out_cleardev: - pci_release_regions(pci_dev); err_out: free_netdev(net_dev); return ret; @@ -2489,7 +2487,6 @@ static void sis900_remove(struct pci_dev *pci_dev) sis_priv->tx_ring_dma); pci_iounmap(pci_dev, sis_priv->ioaddr); free_netdev(net_dev); - pci_release_regions(pci_dev); } #ifdef CONFIG_PM -- 2.30.2