Skip to content

Commit

Permalink
atm: zatm: Fix an error handling path in 'zatm_init_one()'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christophe Jaillet authored and David S. Miller committed Jul 18, 2017
1 parent 18bcf29 commit 799f917
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/atm/zatm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 799f917

Please sign in to comment.