netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] atm: zatm: Fix an error handling path in 'zatm_init_one()'
@ 2017-07-17 17:42 Christophe JAILLET
  2017-07-18 18:38 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2017-07-17 17:42 UTC (permalink / raw)
  To: 3chas3
  Cc: linux-atm-general, netdev, linux-kernel, kernel-janitors,
	Christophe JAILLET

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>
---
 drivers/atm/zatm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c
index 292dec18ffb8..07bdd51b3b9a 100644
--- a/drivers/atm/zatm.c
+++ b/drivers/atm/zatm.c
@@ -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;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] atm: zatm: Fix an error handling path in 'zatm_init_one()'
  2017-07-17 17:42 [PATCH] atm: zatm: Fix an error handling path in 'zatm_init_one()' Christophe JAILLET
@ 2017-07-18 18:38 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-07-18 18:38 UTC (permalink / raw)
  To: christophe.jaillet
  Cc: 3chas3, linux-atm-general, netdev, linux-kernel, kernel-janitors

From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Mon, 17 Jul 2017 19:42:41 +0200

> 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>

Applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-18 18:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-17 17:42 [PATCH] atm: zatm: Fix an error handling path in 'zatm_init_one()' Christophe JAILLET
2017-07-18 18:38 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).