Re: [PATCH] power: reset: at91-reset: free resources on exit path

2021-04-02 Thread Nicolas Ferre
On 01/04/2021 at 16:42, Claudiu Beznea - M18063 wrote: +unmap: +    iounmap(reset->rstc_base); +    for (idx = 0; idx < ARRAY_SIZE(reset->ramc_base); idx++) +    iounmap(reset->ramc_base[idx]); But if we keep this loop, I have the feeling that some kind of "of_node_put()" is needed as well.

Re: [PATCH] power: reset: at91-reset: free resources on exit path

2021-04-01 Thread Claudiu.Beznea
On 31.03.2021 11:18, Nicolas Ferre wrote: > On 09/02/2021 at 12:01, Claudiu Beznea wrote: >> Free resources on exit path (failure path of probe and remove). > > I'm not sure we can use this driver as a module anyway. > > Otherwise, it looks fine, but isn't it possible to use devm_of_iomap(), > ev

Re: [PATCH] power: reset: at91-reset: free resources on exit path

2021-04-01 Thread Claudiu.Beznea
On 01.04.2021 17:42, Claudiu Beznea - M18063 wrote: > On 31.03.2021 11:18, Nicolas Ferre wrote: >> On 09/02/2021 at 12:01, Claudiu Beznea wrote: >>> Free resources on exit path (failure path of probe and remove). >> >> I'm not sure we can use this driver as a module anyway. >> >> Otherwise, it look

Re: [PATCH] power: reset: at91-reset: free resources on exit path

2021-03-31 Thread Nicolas Ferre
On 09/02/2021 at 12:01, Claudiu Beznea wrote: Free resources on exit path (failure path of probe and remove). I'm not sure we can use this driver as a module anyway. Otherwise, it looks fine, but isn't it possible to use devm_of_iomap(), even in loop, and avoid having to deal with exit path?

[PATCH] power: reset: at91-reset: free resources on exit path

2021-02-09 Thread Claudiu Beznea
Free resources on exit path (failure path of probe and remove). Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Claudiu Beznea --- drivers/power/reset/at91-reset.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/po