clk: tegra: tegra124-emc: Fix potential memory leak
authorYuan Can <yuancan@huawei.com>
Fri, 9 Dec 2022 09:41:24 +0000 (09:41 +0000)
committerStephen Boyd <sboyd@kernel.org>
Thu, 15 Jun 2023 01:25:51 +0000 (18:25 -0700)
commit53a06e5924c0d43c11379a08c5a78529c3e61595
tree55575f3f4982c58bce2e3acf92b76329bfc1b858
parent9c632a6396505a019ea6d12b5ab45e659a542a93
clk: tegra: tegra124-emc: Fix potential memory leak

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>
drivers/clk/tegra/clk-tegra124-emc.c