Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1648824pxy; Mon, 2 Aug 2021 07:04:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKpzXf9mnYbEQ79kojmxFlxlunrf2uDQ78qXa11puiUGtR6JNMXHkKg6SGA9ESZSD4+euH X-Received: by 2002:a05:6602:1d4:: with SMTP id w20mr1812482iot.121.1627913042925; Mon, 02 Aug 2021 07:04:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627913042; cv=none; d=google.com; s=arc-20160816; b=q+3GYTqY9ak9Hy99uczsUVEvAC6cR2cOkDMLCZy649OKt2Ze/C7Gc4fZA1O2O7gDOf OZskbFk2g8UIilTDK2tNjuyDjrUoYH9Hk3FKj4HW2i1lrx3TbfjLdcFekzNk2HhcChyd IdWq4M1gOJw5sEEWM7Lg4eoEkvlY6O1DzMvog9VnE8nijsJ6NvLWdmp1XgfQ/9cjy+kB TieZrRTjDSFY6WyP46FFGHGg5Z5KZiz5HVXC+IRPy54Pw20MmGi0JuIYuQSGLN0e14N2 xc6O5nKWZDQxMCmtoY2HKHKkpOcQa8+nutBcDQVVmd7sKaX3ZaItYugQXMh+VBc0ZLWT QhFQ== 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=mqPvpshSdUfnMwRBFEaU85e67D8IgZJyd1iW8sb2040=; b=MJUXFKgsQjv4G7KoHDRmnRPRXUX2AvWDUHT4FMNB7kmKwd8dHn4K6Vzicgl7JfjTBl fDnkMT3L31MwlQn/cwNFbYTF4/EsjYYTJb2LLzyceWNwCQR1s96EIACSaavhDJE7paW8 smECNC2DC7frkNI76WtZhtU4CPkkl1KzlbqBwFhe31ON0X2ySFjJEAAKgoROWr5AMJy5 GwauaqO0JlJ2d3+nHyLLrrcfrXnPbd7pvtOsohLls1s7UEE+qg+2pQ8+KbLb5/S+uSy6 iHsqBWgTGpGMAxDkbhyUg4hmxCvjpE8JIHJ29rVfYHwz8IMmOvx7mQaBMHZE0otquwlM tS9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="VYlxgT/+"; 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 az3si12161331jab.111.2021.08.02.07.03.51; Mon, 02 Aug 2021 07:04:02 -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="VYlxgT/+"; 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 S234959AbhHBODR (ORCPT + 99 others); Mon, 2 Aug 2021 10:03:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:34430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235356AbhHBNz2 (ORCPT ); Mon, 2 Aug 2021 09:55:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 644C261186; Mon, 2 Aug 2021 13:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912432; bh=Qse8AYPvhI/vJl99cRwAlhzW6RodKYZVAvZgcVbh4+I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VYlxgT/+MMt8e0cyJFC7B2xll/yNlqhYgFytIJfZN3y0yqX1zyjS/41CMmkBA/0QF uJTdAUlLm4SdC/w6rQioGw5l57/gwcXrr2TZRAML3rfAPY5pY+YpgGbQ1UVNNuAScu L1CsebEtX1GxcnYiA81Wi6hrcz9YLyIM79y8ZsAw= 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 56/67] sis900: Fix missing pci_disable_device() in probe and remove Date: Mon, 2 Aug 2021 15:45:19 +0200 Message-Id: <20210802134340.957293927@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 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 620c26f71be8..e267b7ce3a45 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 = dma_set_mask(&pci_dev->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); @@ -581,8 +581,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; @@ -2499,7 +2497,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); } static int __maybe_unused sis900_suspend(struct device *dev) -- 2.30.2