This duplicate code were added by merge commit 8ecba9a7df3f ("Merge
branch 'v5.15/standard/base' into v5.15/standard/nxp-sdk-5.15/nxp-soc"),
but there's already a similar piece of code a few lines above this
segment.

        if (!imx_scu_clk_is_valid(rsrc_id))
                return ERR_PTR(-EINVAL);

So drop this duplicate code.

Signed-off-by: Kevin Hao <kexin....@windriver.com>
---
Hi Bruce,

Please merge this patch onto the following two branches:
  v5.15/standard/nxp-sdk-5.15/nxp-soc
  v5.15/standard/preempt-rt/nxp-sdk-5.15/nxp-soc

 drivers/clk/imx/clk-scu.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c
index 1d057ded6f63..657ed18ba330 100644
--- a/drivers/clk/imx/clk-scu.c
+++ b/drivers/clk/imx/clk-scu.c
@@ -875,11 +875,6 @@ struct clk_hw *__imx_clk_gpr_scu(const char *name, const 
char * const *parent_na
        if (!clk_node)
                return ERR_PTR(-ENOMEM);
 
-       if (!imx_scu_clk_is_valid(rsrc_id)) {
-               kfree(clk_node);
-               return ERR_PTR(-EINVAL);
-       }
-
        clk = kzalloc(sizeof(*clk), GFP_KERNEL);
        if (!clk) {
                kfree(clk_node);
-- 
2.40.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13617): 
https://lists.yoctoproject.org/g/linux-yocto/message/13617
Mute This Topic: https://lists.yoctoproject.org/mt/104602372/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to