]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
atm: eni: fix the missed pci_disable_device() for eni_init_one()
authorJing Xiangfeng <jingxiangfeng@huawei.com>
Fri, 4 Sep 2020 02:51:03 +0000 (10:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 11:18:17 +0000 (13:18 +0200)
[ Upstream commit c2b947879ca320ac5505c6c29a731ff17da5e805 ]

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

Fixes: ede58ef28e10 ("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>
drivers/atm/eni.c

index 9d0d65efcd94e97da049e48dd7e9f5aedfccc8f3..bedaebd5a49561388222e1b7bbf8f720c42e1050 100644 (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);