Re: [PATCH] remoteproc: core: Fix ida_free call while not allocated

2024-12-02 Thread Mathieu Poirier
On Fri, Nov 22, 2024 at 06:51:27PM +0100, Arnaud Pouliquen wrote: > In the rproc_alloc() function, on error, put_device(&rproc->dev) is > called, leading to the call of the rproc_type_release() function. > An error can occurs before ida_alloc is called. > > In such case in rproc_type_release(), th

[PATCH] remoteproc: core: Fix ida_free call while not allocated

2024-11-22 Thread Arnaud Pouliquen
In the rproc_alloc() function, on error, put_device(&rproc->dev) is called, leading to the call of the rproc_type_release() function. An error can occurs before ida_alloc is called. In such case in rproc_type_release(), the condition (rproc->index >= 0) is true as rproc->index has been initialize