summaryrefslogtreecommitdiffstats
path: root/drivers/atm
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-12-19 14:01:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-12 19:49:01 +0100
commit1b9071c0503ddde49bb7b71760f24341fa673f13 (patch)
tree2b034f22ae09eeda94c00be68ef054774b2d2991 /drivers/atm
parentd33701e2d16e4e91db50849ea10dfc7938d8918e (diff)
downloadlinux-stable-1b9071c0503ddde49bb7b71760f24341fa673f13.tar.gz
linux-stable-1b9071c0503ddde49bb7b71760f24341fa673f13.tar.bz2
linux-stable-1b9071c0503ddde49bb7b71760f24341fa673f13.zip
atm: idt77252: call pci_disable_device() on error path
[ Upstream commit 8df66af5c1e5f80562fe728db5ec069b21810144 ] 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@oracle.com> Link: https://lore.kernel.org/r/X93dmC4NX0vbTpGp@mwanda Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/atm')
-rw-r--r--drivers/atm/idt77252.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index 074616b39f4d..89adb49e435e 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -3615,7 +3615,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);