[PATCH -next] drivers: net: hippi: Add missing pci_disable_device() in rr_init_one()

From: ruanjinjie
Date: Fri Sep 23 2022 - 05:48:04 EST


Add missing pci_disable_device() if rr_init_one() fails

Signed-off-by: ruanjinjie <ruanjinjie@xxxxxxxxxx>
---
drivers/net/hippi/rrunner.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c
index 74e845fa2e07..aa8f828a0ae7 100644
--- a/drivers/net/hippi/rrunner.c
+++ b/drivers/net/hippi/rrunner.c
@@ -213,6 +213,7 @@ static int rr_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
pci_iounmap(pdev, rrpriv->regs);
if (pdev)
pci_release_regions(pdev);
+ pci_disable_device(pdev);
out2:
free_netdev(dev);
out3:
--
2.25.1