Searched hist:"5 a938500" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/clk/mediatek/ |
H A D | clk-pll.c | 5a938500 Tue Oct 24 00:00:53 CDT 2023 Dan Carpenter <dan.carpenter@linaro.org> clk: mediatek: fix double free in mtk_clk_register_pllfh()
[ Upstream commit bd54ccc0f147019dac38e7841876a7415459b875 ]
The mtk_clk_register_pll_ops() currently frees the "pll" parameter. The function has two callers, mtk_clk_register_pll() and mtk_clk_register_pllfh(). The first one, the _pll() function relies on the free, but for the second _pllfh() function it causes a double free bug.
Really the frees should be done in the caller because that's where the allocation is.
Fixes: d7964de8a8ea ("clk: mediatek: Add new clock driver to handle FHCTL hardware") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/cd7fa365-28cc-4c34-ac64-6da57c98baa6@moroto.mountain Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
|