RE: [PATCH V6 12/12] clk: imx: scu: unregister clocks if add provider failed
From: Aisheng Dong <aisheng.dong@nxp.com>
Date: 2020-05-05 14:06:08
Also in:
linux-clk
From: Stephen Boyd <sboyd@kernel.org> Sent: Tuesday, May 5, 2020 12:56 PM Quoting Dong Aisheng (2020-03-15 06:43:56)quoted
Unregister clocks if add provider failed Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com> ---Why isn't this squashed in to where it's needed?
There were two reasons: 1. The original code also has the issue, so I thought maybe It could be an extra fix patch. 2. It saved some rebase conflicts. But anyway, if you'd like to see it was squashed, I can do it in next version.
quoted
ChangeLog: v6: new patch --- drivers/clk/imx/clk-imx8qxp.c | 11 +++++++++-- drivers/clk/imx/clk-scu.c | 13 +++++++++++++ drivers/clk/imx/clk-scu.h | 2 ++ 3 files changed, 24 insertions(+), 2 deletions(-)diff --git a/drivers/clk/imx/clk-imx8qxp.cb/drivers/clk/imx/clk-imx8qxp.c index 2ec3e0c4749d..e615214495c0 100644--- a/drivers/clk/imx/clk-imx8qxp.c +++ b/drivers/clk/imx/clk-imx8qxp.c@@ -138,10 +138,17 @@ static int imx8qxp_clk_probe(structplatform_device *pdev)quoted
i, PTR_ERR(clks[i])); } - if (clk_cells == 2) + if (clk_cells == 2) { ret = of_clk_add_hw_provider(ccm_node,imx_scu_of_clk_src_get, imx_scu_clks);quoted
- else + if (ret) + imx_clk_scu_unregister(); + } else { + /* + * NOTE: we did not unregister clocks for the legacy waycausequoted
+ * it will be removed later.I got confused what 'it' was. I think it's the legacy way entirely. Maybe say "legacy binding code path doesn't unregister here because..."
Thanks for the suggestion. I will change to use your version 😊 Regards Aisheng
quoted
+ */ ret = of_clk_add_hw_provider(ccm_node, of_clk_hw_onecell_get, clk_data); + } return ret; }
_______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel