Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 588edb4f authored by Qiheng Lin's avatar Qiheng Lin Committed by Greg Kroah-Hartman
Browse files

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: 08c3e06a ("mfd: PCF50633 adc driver")
Signed-off-by: default avatarQiheng Lin <linqiheng@huawei.com>
Signed-off-by: default avatarLee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221208061555.8776-1-linqiheng@huawei.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6e0a0eb1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment