Skip to content

Commit

Permalink
dmaengine: ioat: Fix error handling path
Browse files Browse the repository at this point in the history
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>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Christophe JAILLET authored and Vinod Koul committed Nov 29, 2017
1 parent 4fbd8d1 commit 5c9afbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/ioat/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5c9afbd

Please sign in to comment.