Qiheng Lin 41cdf082ae mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read()
[ Upstream commit 8b450dcff23aa254844492831a8e2b508a9d522d ]

`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@huawei.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221208061555.8776-1-linqiheng@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-11 16:31:43 +01:00
..
2016-11-29 08:21:33 +00:00
2018-06-11 07:20:17 -07:00
2018-07-04 07:17:13 +01:00
2018-01-08 11:03:35 +00:00
2017-07-18 08:27:18 +01:00
2016-08-10 09:25:18 +01:00
2017-04-27 09:25:04 +01:00