[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <X93dmC4NX0vbTpGp@mwanda>
Date: Sat, 19 Dec 2020 14:01:44 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Chas Williams <3chas3@...il.com>
Cc: chas williams - CONTRACTOR <chas@....nrl.navy.mil>,
"David S. Miller" <davem@...emloft.net>,
linux-atm-general@...ts.sourceforge.net, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [PATCH net] atm: idt77252: call pci_disable_device() on error path
This error path needs to disable the pci device before returning.
Fixes: ede58ef28e10 ("atm: remove deprecated use of pci api")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
drivers/atm/idt77252.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index 65a3886f68c9..5f0472c18bcb 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -3607,7 +3607,7 @@ static int idt77252_init_one(struct pci_dev *pcidev,
if ((err = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(32)))) {
printk("idt77252: can't enable DMA for PCI device at %s\n", pci_name(pcidev));
- return err;
+ goto err_out_disable_pdev;
}
card = kzalloc(sizeof(struct idt77252_dev), GFP_KERNEL);
--
2.29.2
Powered by blists - more mailing lists