public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: ioat: Fix error handling path
@ 2017-11-17 21:37 Christophe JAILLET
  2017-11-17 21:44 ` Dave Jiang
  2017-11-29 14:16 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2017-11-17 21:37 UTC (permalink / raw)
  To: dan.j.williams, vinod.koul, dave.jiang, bianpan2016,
	arvind.yadav.cs, kjlx, geliangtang
  Cc: dmaengine, linux-kernel, kernel-janitors, Christophe JAILLET

If the last test in 'ioat_dma_self_test()' fails, we must release all
the allocated resources and not just part of them.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/dma/ioat/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/ioat/init.c b/drivers/dma/ioat/init.c
index 2f31d3d0caa6..7792a9186f9c 100644
--- a/drivers/dma/ioat/init.c
+++ b/drivers/dma/ioat/init.c
@@ -390,7 +390,7 @@ static int ioat_dma_self_test(struct ioatdma_device *ioat_dma)
 	if (memcmp(src, dest, IOAT_TEST_SIZE)) {
 		dev_err(dev, "Self-test copy failed compare, disabling\n");
 		err = -ENODEV;
-		goto free_resources;
+		goto unmap_dma;
 	}
 
 unmap_dma:
-- 
2.14.1

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

end of thread, other threads:[~2017-11-29 14:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-17 21:37 [PATCH] dmaengine: ioat: Fix error handling path Christophe JAILLET
2017-11-17 21:44 ` Dave Jiang
2017-11-29 14:16 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox