Skip to content

Commit 5c9afbd

Browse files
tititiou36Vinod Koul
authored andcommitted
dmaengine: ioat: Fix error handling path
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 <[email protected]> Acked-by: Dave Jiang <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
1 parent 4fbd8d1 commit 5c9afbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma/ioat/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ static int ioat_dma_self_test(struct ioatdma_device *ioat_dma)
390390
if (memcmp(src, dest, IOAT_TEST_SIZE)) {
391391
dev_err(dev, "Self-test copy failed compare, disabling\n");
392392
err = -ENODEV;
393-
goto free_resources;
393+
goto unmap_dma;
394394
}
395395

396396
unmap_dma:

0 commit comments

Comments
 (0)