Skip to contentSkip to conversation

atm: idt77252: call pci_disable_device() on error path

PATCH Applied Dan Carpenter 2 participants 2 messages Dec 19, 2020 – Dec 22, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 atm: idt77252: call pci_disable_device() on error path

This error path needs to disable the pci device before returning.

Fixes ede58ef28e10 ("atm: remove deprecated use of pci api")
---
 drivers/atm/idt77252.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/atm/idt77252.c +1 -1
index 65a3886f68c9..5f0472c18bcb 100644
@@ -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);
Signature · 1 line
2.29.2
#1 lore raw
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 7 lines · On Sat, 19 Dec 2020 14:01:44 +0300 you wrote:

This error path needs to disable the pci device before returning.

Fixes ede58ef28e10 ("atm: remove deprecated use of pci api")
---
 drivers/atm/idt77252.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- [net] atm: idt77252: call pci_disable_device() on error path

    https://git.kernel.org/netdev/net/c/8df66af5c1e5

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html