kernel-janitors.vger.kernel.org archive mirror
 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:28 ` 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

* Re: [PATCH] dmaengine: ioat: Fix error handling path
  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:28 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Jiang @ 2017-11-17 21:44 UTC (permalink / raw)
  To: Christophe JAILLET, Williams, Dan J, Koul, Vinod,
	bianpan2016@163.com, arvind.yadav.cs@gmail.com,
	kjlx@templeofstupid.com, geliangtang@gmail.com
  Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org



On 11/17/2017 02:37 PM, Christophe JAILLET wrote:
> 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>

Good catch! Thanks! Acked-by: Dave Jiang <dave.jiang@intel.com>

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

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

* Re: [PATCH] dmaengine: ioat: Fix error handling path
  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:28 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2017-11-29 14:28 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: dan.j.williams, dave.jiang, bianpan2016, arvind.yadav.cs, kjlx,
	geliangtang, dmaengine, linux-kernel, kernel-janitors

On Fri, Nov 17, 2017 at 10:37:53PM +0100, Christophe JAILLET wrote:
> If the last test in 'ioat_dma_self_test()' fails, we must release all
> the allocated resources and not just part of them.

Applied, thanks

-- 
~Vinod

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

end of thread, other threads:[~2017-11-29 14:28 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:28 ` Vinod Koul

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