Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1639352pxy; Mon, 2 Aug 2021 06:51:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxZNaRY25Q6yIun54vXDghJBk4eIvIC5ApRmlb3wvTC6r2WdyAWhuf5WNH6Lszg4+4KMU8 X-Received: by 2002:a02:cf2e:: with SMTP id s14mr15298315jar.74.1627912288745; Mon, 02 Aug 2021 06:51:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912288; cv=none; d=google.com; s=arc-20160816; b=SIkHyaFfJ2o33LjTluAjXNcjCYKggwzcH2E5TFPEPzLhQ9LGWP9L4vBdc634tX1CCr bU7Wa6xod62S2hb2YgmLaBYSDk6iELXmosHr+YXJZdIhvZH37JC3tEepeodVqiw9aaEq OVI4KCtsJ0MIyBV3ZNhMyRVhp1Q7naQIm404XwkhIe0fVVjdIgyFKqVX/NFYzwVaVHCo eEDYzQvfHbQdnx3TBxQVDm/wj3nPpSuNAf6obC0pIQKK5IyqoZ2ytozJotvYI+LQTBva eM0ZfPlGTLwIZG5TfuVx+Rl5Mt5KWNDpPtWzBorZ+nKd53Wi7CybVWDEA5e+CmbKQjSC dNZA== 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=LqG2UhssymE9OlkIs/yXIezCFmkDsqdl4y4GZ/V4IzM=; b=LiubLNRbMxPqKmoSMvy8p6+GtZmkxnKM49wioMa0ueemIc3lYRQiOIcm0bcsFOeeX9 HPTJ/j0xQQybzMUBvHUfP9lRIQfpK4JkqyGCX1ZoBzdMgry6rKRyTXgQBm4MgyX1lixW 66WylZqYSd48a5NJE0fZ/T/1uV+6EhFyLZn1Uo/MO4V36Db6aVF4xunxvT/Gs57LlbK1 D/QHeuMLzkgEE98TWPXhE9+WkX4j+w3/0syoJEr8ONahLa57XQXa4MD51kTEEFEB9/qn nLvTxCXzIYKuwqJDoWu3WsZXtznwwJuWlaDs7ZnVz9tICIatTSIfIK5JxN73QyRv8fP8 Y4DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nfd1SE7j; 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 o19si11921113jav.61.2021.08.02.06.51.17; Mon, 02 Aug 2021 06:51:28 -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=nfd1SE7j; 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 S234967AbhHBNue (ORCPT + 99 others); Mon, 2 Aug 2021 09:50:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:58052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234310AbhHBNr5 (ORCPT ); Mon, 2 Aug 2021 09:47:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DC300610FD; Mon, 2 Aug 2021 13:47:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912065; bh=joNAro/gVbiWLdK5wZF5BtH/rSA25Lcax58mBxFIgHk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nfd1SE7j4+ChRjH1IPt5sc9fU6WM5c32VtOMsKYK1eGCS8NVzuLFjF67hVFwSO1RC pf8p7nikD7YwYyjR+HCs4xpdwneDr/YYytGPjhBLAAy3e30Ws5RtvMRaVIQxVL8/Mb 4gtU2OfqZAhY3W/C5bLSlw/sfQlLl8qOduvOnURY= 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 32/32] sis900: Fix missing pci_disable_device() in probe and remove Date: Mon, 2 Aug 2021 15:44:52 +0200 Message-Id: <20210802134333.940594691@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 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 ae9b983e8e5c..4a0e69a2d4f5 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