Re: [PATCH v2] dmaengine: ptdma: Fix the error handling path in pt_core_init()
From: Sanjay R Mehta
Date: Mon Feb 07 2022 - 23:24:29 EST
On 2/7/2022 10:21 PM, Dan Carpenter wrote:
> On Sat, Feb 05, 2022 at 07:58:44AM +0100, Christophe JAILLET wrote:
>> 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: fa5d823b16a9 ("dmaengine: ptdma: Initial driver for the AMD PTDMA")
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
>> ---
>> v2: update label names
>> move dev_err(dev, "unable to allocate an IRQ\n");
>
> Awesome. Thanks!
>
> Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Thank you!
Acked-by: Sanjay R Mehta <sanju.mehta@xxxxxxx>
>
> regards,
> dan carpenter
>