public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: ioatdma: Fix error handling path in 'ioat_dma_self_test()'
@ 2017-07-19 22:16 Christophe JAILLET
  2017-07-19 22:21 ` Dave Jiang
  2017-07-20  7:24 ` walter harms
  0 siblings, 2 replies; 11+ messages in thread
From: Christophe JAILLET @ 2017-07-19 22:16 UTC (permalink / raw)
  To: dan.j.williams, vinod.koul, dave.jiang
  Cc: dmaengine, linux-kernel, kernel-janitors, Christophe JAILLET

If the 'memcmp' fails, free allocated resources as done in all other
error handling paths.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Please review carefully, this patch looks "too obvious" to me!
---
 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 ed8ed1192775..948fc1f8fb5c 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.11.0

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

end of thread, other threads:[~2017-07-21 16:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-19 22:16 [PATCH] dmaengine: ioatdma: Fix error handling path in 'ioat_dma_self_test()' Christophe JAILLET
2017-07-19 22:21 ` Dave Jiang
2017-07-21  6:31   ` Vinod Koul
2017-07-21  6:44     ` Jiang, Dave
2017-07-20  7:24 ` walter harms
2017-07-20 16:56   ` Dave Jiang
2017-07-21  7:22     ` walter harms
2017-07-21  7:23       ` Julia Lawall
2017-07-21  9:38         ` Dan Carpenter
2017-07-21  7:57     ` Vinod Koul
2017-07-21 16:50       ` Dave Jiang

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