aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2024-03-12 12:14:22 -0500
committerBjorn Helgaas <bhelgaas@google.com>2024-03-12 12:14:22 -0500
commit598b08b7752fe6b9de86333a8ec64997a5b5cff4 (patch)
treee69856005e11c86592b1c8f9bfa2b164e2eed373 /drivers/pci
parentMerge branch 'pci/pm' (diff)
parentPCI: switchtec: Fix an error handling path in switchtec_pci_probe() (diff)
downloadwireguard-linux-598b08b7752fe6b9de86333a8ec64997a5b5cff4.tar.xz
wireguard-linux-598b08b7752fe6b9de86333a8ec64997a5b5cff4.zip
Merge branch 'pci/switchtec'
- Fix error handling path in switchtec_pci_probe() (Christophe JAILLET) * pci/switchtec: PCI: switchtec: Fix an error handling path in switchtec_pci_probe()
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/switch/switchtec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index 1804794d0e68..5a4adf6c04cf 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -1672,7 +1672,7 @@ static int switchtec_pci_probe(struct pci_dev *pdev,
rc = switchtec_init_isr(stdev);
if (rc) {
dev_err(&stdev->dev, "failed to init isr.\n");
- goto err_put;
+ goto err_exit_pci;
}
iowrite32(SWITCHTEC_EVENT_CLEAR |
@@ -1693,6 +1693,8 @@ static int switchtec_pci_probe(struct pci_dev *pdev,
err_devadd:
stdev_kill(stdev);
+err_exit_pci:
+ switchtec_exit_pci(stdev);
err_put:
ida_free(&switchtec_minor_ida, MINOR(stdev->dev.devt));
put_device(&stdev->dev);