Skip to content

Commit

Permalink
atm: eni: fix the missed pci_disable_device() for eni_init_one()
Browse files Browse the repository at this point in the history
eni_init_one() misses to call pci_disable_device() in an error path.
Jump to err_disable to fix it.

Fixes: ede58ef ("atm: remove deprecated use of pci api")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jing Xiangfeng authored and Jakub Kicinski committed Sep 5, 2020
1 parent 44a049c commit c2b9478
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/atm/eni.c
Original file line number Diff line number Diff line change
Expand Up @@ -2224,7 +2224,7 @@ static int eni_init_one(struct pci_dev *pci_dev,

rc = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32));
if (rc < 0)
goto out;
goto err_disable;

rc = -ENOMEM;
eni_dev = kmalloc(sizeof(struct eni_dev), GFP_KERNEL);
Expand Down

0 comments on commit c2b9478

Please sign in to comment.