1
0
Fork 0

atm: eni: fix the missed pci_disable_device() for eni_init_one()

[ Upstream commit c2b947879c ]

eni_init_one() misses to call pci_disable_device() in an error path.
Jump to err_disable to fix it.

Fixes: ede58ef28e ("atm: remove deprecated use of pci api")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
Jing Xiangfeng 2020-09-04 10:51:03 +08:00 committed by Greg Kroah-Hartman
parent e0117ad11b
commit 5b0a13a03b
1 changed files with 1 additions and 1 deletions

View File

@ -2245,7 +2245,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);