Skip to content

Commit 799f917

Browse files
tititiou36davem330
authored andcommitted
atm: zatm: Fix an error handling path in 'zatm_init_one()'
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>
1 parent 18bcf29 commit 799f917

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/atm/zatm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1613,7 +1613,7 @@ static int zatm_init_one(struct pci_dev *pci_dev,
16131613

16141614
ret = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32));
16151615
if (ret < 0)
1616-
goto out_disable;
1616+
goto out_release;
16171617

16181618
zatm_dev->pci_dev = pci_dev;
16191619
dev->dev_data = zatm_dev;

0 commit comments

Comments
 (0)