Skip to content

Commit

Permalink
atm: idt77252: call pci_disable_device() on error path
Browse files Browse the repository at this point in the history
This error path needs to disable the pci device before returning.

Fixes: ede58ef ("atm: remove deprecated use of pci api")
Signed-off-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/X93dmC4NX0vbTpGp@mwanda
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
Dan Carpenter authored and kuba-moo committed Dec 22, 2020
1 parent 8346989 commit 8df66af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/atm/idt77252.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8df66af

Please sign in to comment.