]> git.itanic.dy.fi Git - linux-stable/commit
thermal/drivers/mediatek/lvts_thermal: Fix a memory leak in an error handling path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 28 Jan 2024 08:38:10 +0000 (09:38 +0100)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:17:31 +0000 (18:17 -0400)
commit9b02197596671800dd934609384b1aca7c6ad218
tree91ce99b88ac94509ad2cccd52690e4af8dfe6f5e
parent3c48b05e46df2b72ebdec83b0ec13903334a46e5
thermal/drivers/mediatek/lvts_thermal: Fix a memory leak in an error handling path

[ Upstream commit ca93bf607a44c1f009283dac4af7df0d9ae5e357 ]

If devm_krealloc() fails, then 'efuse' is leaking.
So free it to avoid a leak.

Fixes: f5f633b18234 ("thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/481d345233862d58c3c305855a93d0dbc2bbae7e.1706431063.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/mediatek/lvts_thermal.c