Re: [PATCH] mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read()

From: Lee Jones
Date: Wed Jan 04 2023 - 11:13:55 EST


On Thu, 08 Dec 2022, Qiheng Lin wrote:

> `req` is allocated in pcf50633_adc_async_read(), but
> adc_enqueue_request() could fail to insert the `req` into queue.
> We need to check the return value and free it in the case of failure.
>
> Fixes: 08c3e06a5eb2 ("mfd: PCF50633 adc driver")
> Signed-off-by: Qiheng Lin <linqiheng@xxxxxxxxxx>
> ---
> drivers/mfd/pcf50633-adc.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)

Applied, thanks

--
Lee Jones [李琼斯]