Skip to content
Commit 3c62fd34 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Vinod Koul
Browse files

dmaengine: ptdma: Fix the error handling path in pt_core_init()

In order to free resources correctly in the error handling path of
pt_core_init(), 2 goto's have to be switched. Otherwise, some resources
will leak and we will try to release things that have not been allocated
yet.

Also move a dev_err() to a place where it is more meaningful.

Fixes: fa5d823b

 ("dmaengine: ptdma: Initial driver for the AMD PTDMA")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: default avatarSanjay R Mehta <sanju.mehta@amd.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/41a963a35173f89c874f5c44df5530dc09fea8da.1644044244.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent e783362e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment