Qiheng Lin 9cca3a4933 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-10 09:33:28 +01:00
..
2022-03-25 13:56:18 -07:00
2022-08-06 10:25:16 -07:00
2022-08-16 12:46:26 +02:00
2022-10-07 11:24:20 -07:00
2022-03-21 18:33:57 -07:00
2022-10-07 11:24:20 -07:00
2022-08-16 12:46:26 +02:00
2023-03-10 09:33:28 +01:00
2022-10-07 11:24:20 -07:00
2019-07-15 20:18:40 -07:00
2022-09-28 16:09:50 +01:00
2022-08-16 12:46:26 +02:00
2022-08-16 12:46:26 +02:00
2022-10-07 11:24:20 -07:00
2022-08-16 12:46:26 +02:00
2022-09-28 16:09:50 +01:00
2022-08-16 12:46:26 +02:00
2022-09-28 16:17:40 +01:00
2019-07-09 08:59:39 -07:00
2022-10-07 11:24:20 -07:00