]> git.baikalelectronics.ru Git - kernel.git/commitdiff
atm: zatm: Fix an error handling path in 'zatm_init_one()'
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Mon, 17 Jul 2017 17:42:41 +0000 (19:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Jul 2017 18:37:46 +0000 (11:37 -0700)
If 'dma_set_mask_and_coherent()' fails, we must undo the previous
'pci_request_regions()' call.
Adjust corresponding 'goto' to jump at the right place of the error
handling path.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/atm/zatm.c

index 292dec18ffb87acf57842f3a0c2490b326488e12..07bdd51b3b9aab2e82e79346f52f6eb1bf4d9cbe 100644 (file)
@@ -1613,7 +1613,7 @@ static int zatm_init_one(struct pci_dev *pci_dev,
 
        ret = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32));
        if (ret < 0)
-               goto out_disable;
+               goto out_release;
 
        zatm_dev->pci_dev = pci_dev;
        dev->dev_data = zatm_dev;