netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe()
@ 2022-05-10  3:13 Yang Yingliang
  2022-05-11  2:30 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2022-05-10  3:13 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, linux-stm32, netdev
  Cc: peppe.cavallaro, alexandre.torgue, davem, edumazet, kuba

Switch to using pcim_enable_device() to avoid missing pci_disable_device().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
  v2: switch to using pcim_enable_device()
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
index fcf17d8a0494..644bb54f5f02 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
@@ -181,7 +181,7 @@ static int stmmac_pci_probe(struct pci_dev *pdev,
 		return -ENOMEM;
 
 	/* Enable pci device */
-	ret = pci_enable_device(pdev);
+	ret = pcim_enable_device(pdev);
 	if (ret) {
 		dev_err(&pdev->dev, "%s: ERROR: failed to enable device\n",
 			__func__);
@@ -241,8 +241,6 @@ static void stmmac_pci_remove(struct pci_dev *pdev)
 		pcim_iounmap_regions(pdev, BIT(i));
 		break;
 	}
-
-	pci_disable_device(pdev);
 }
 
 static int __maybe_unused stmmac_pci_suspend(struct device *dev)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe()
  2022-05-10  3:13 [PATCH v2] net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe() Yang Yingliang
@ 2022-05-11  2:30 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-11  2:30 UTC (permalink / raw)
  To: Yang Yingliang
  Cc: linux-kernel, linux-arm-kernel, linux-stm32, netdev,
	peppe.cavallaro, alexandre.torgue, davem, edumazet, kuba

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 10 May 2022 11:13:16 +0800 you wrote:
> Switch to using pcim_enable_device() to avoid missing pci_disable_device().
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>   v2: switch to using pcim_enable_device()
> 
> [...]

Here is the summary with links:
  - [v2] net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe()
    https://git.kernel.org/netdev/net/c/0807ce0b0104

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-11  2:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10  3:13 [PATCH v2] net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe() Yang Yingliang
2022-05-11  2:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).