]> git.hungrycats.org Git - linux/commit
clk: tegra: tegra124-emc: Fix potential memory leak
authorYuan Can <yuancan@huawei.com>
Fri, 9 Dec 2022 09:41:24 +0000 (09:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jul 2023 17:39:42 +0000 (19:39 +0200)
commite969c144d908ea9387442659f103d374c8ff682d
tree4f31a9fa7d98100403a33dbad87b3b4bc9314958
parent25dbdfb7b71ef8601d00c6d9a2b1a96de28b30c5
clk: tegra: tegra124-emc: Fix potential memory leak

[ Upstream commit 53a06e5924c0d43c11379a08c5a78529c3e61595 ]

The tegra and tegra needs to be freed in the error handling path, otherwise
it will be leaked.

Fixes: 2db04f16b589 ("clk: tegra: Add EMC clock driver")
Signed-off-by: Yuan Can <yuancan@huawei.com>
Link: https://lore.kernel.org/r/20221209094124.71043-1-yuancan@huawei.com
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/tegra/clk-tegra124-emc.c