Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1638344pxy; Mon, 2 Aug 2021 06:50:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyp5WFd8dzewuhyZnSPfDUl2jsi2jmK94ck+xDNuYbUspEr9wxfEjEHU+YAZ+Kvi9jYzV8s X-Received: by 2002:a92:905:: with SMTP id y5mr1716953ilg.222.1627912209302; Mon, 02 Aug 2021 06:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912209; cv=none; d=google.com; s=arc-20160816; b=Bh1KuSPT0iiMCd+j/+0Kb/HT35BQks535vkvLtvIBWINhrwvoUKTEpwuRFM/HfWNDe oJMBg0vj+/2oQLPUF+6OVhGti2ciOZVHRe9PkTkR0xHTnKRSNiFKljRLPdset45OVa+Q oUEB7J9hoht7OzfLlQF1Beeq2E9T78om8LokZv7rkAPYwVaJcdbwVe0s4edrxsRzwv3G H9cIeTx1pwm36e0le57iAcQvJuddLURkwHuicJUT+hDFdH2Y4S/YWaf9RkKpqxyRfPDd A7maPjbUODmHFqWlcFQv1GhP2EnlBTYfUgIRUEcP8l0cFwNGQ7Tzy0+jtOEDZ9MiPoHF t4Cg== 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=JMbepIT6aqEZmRVtHMwlmbhxk7TTnxCLhJOEIHI8Uhs=; b=ROQ+5hVz8H5dQN5PhnC7pNvM0OMzb7fME9wFfIyO8UFU5OLNWQk4xEysDTKnzUrKiN 61x+9wwrOD4xT8idmmwz2UdKkSemY2DUNlkQ/PTm3ettS94ctbZkEOSLo1rz/NaP9UfS sF4O1QU9ggfKh8r10xScXGDLXQcrqh/AAli9axf0UKZguJzfsEAXxfSb9Xm31m1aJudw 0yiEJVacxJp1JCpkHTcIVB88v8BMe6MLx2W2Kq/sxTBAO8Reyf00Yx8oarC6iPeMCXlD MHq3dqysVwYUq9jegbkz6jK/P2tOvamoGXsTTCUYMCpKRQ+uDY5asS/jo8BaKVNuCIcP W+oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0AxSDSnw; 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 z14si12998230ilu.89.2021.08.02.06.49.57; Mon, 02 Aug 2021 06:50:09 -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=0AxSDSnw; 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 S234623AbhHBNst (ORCPT + 99 others); Mon, 2 Aug 2021 09:48:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:56780 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234208AbhHBNq6 (ORCPT ); Mon, 2 Aug 2021 09:46:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 712D360F6D; Mon, 2 Aug 2021 13:46:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912008; bh=VvBuBiEOi4IMRx68PoRoXUSYbCgSvqJ/oUCpji9yI+w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0AxSDSnwL6zNTnP9OTQFmIGd9Ycpy27doc3ysnj4J3Ag/NM/vveZFQeDbb+dNurNy FxHKwOcLGUD1vPCXUoARwmo5EgculmtIsQ2f6DHFctH5/Es6tiQbRPl6ElV9A9k+C4 l4OcJnEpmw5x2vDDmt7S9H99WCWy7oeAWPs3hFSE= 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.4 26/26] sis900: Fix missing pci_disable_device() in probe and remove Date: Mon, 2 Aug 2021 15:44:36 +0200 Message-Id: <20210802134332.873857383@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134332.033552261@linuxfoundation.org> References: <20210802134332.033552261@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 dff5b56738d3..9fe5d13402e0 100644 --- a/drivers/net/ethernet/sis/sis900.c +++ b/drivers/net/ethernet/sis/sis900.c @@ -442,7 +442,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)); @@ -468,7 +468,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); @@ -576,8 +576,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; @@ -2425,7 +2423,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