2020-09-21 08:04:47

by Liu Shixin

[permalink] [raw]
Subject: [PATCH -next] clk: mediatek: mt7629: simplify the return expression of mtk_infrasys_init

Simplify the return expression.

Signed-off-by: Liu Shixin <[email protected]>
---
drivers/clk/mediatek/clk-mt7629.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/mediatek/clk-mt7629.c b/drivers/clk/mediatek/clk-mt7629.c
index b73bdf152836..a0ee079670c7 100644
--- a/drivers/clk/mediatek/clk-mt7629.c
+++ b/drivers/clk/mediatek/clk-mt7629.c
@@ -601,7 +601,6 @@ static int mtk_infrasys_init(struct platform_device *pdev)
{
struct device_node *node = pdev->dev.of_node;
struct clk_onecell_data *clk_data;
- int r;

clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK);

@@ -611,12 +610,8 @@ static int mtk_infrasys_init(struct platform_device *pdev)
mtk_clk_register_cpumuxes(node, infra_muxes, ARRAY_SIZE(infra_muxes),
clk_data);

- r = of_clk_add_provider(node, of_clk_src_onecell_get,
- clk_data);
- if (r)
- return r;
-
- return 0;
+ return of_clk_add_provider(node, of_clk_src_onecell_get,
+ clk_data);
}

static int mtk_pericfg_init(struct platform_device *pdev)
--
2.25.1


2020-09-22 19:58:35

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH -next] clk: mediatek: mt7629: simplify the return expression of mtk_infrasys_init

Quoting Liu Shixin (2020-09-21 01:24:26)
> Simplify the return expression.
>
> Signed-off-by: Liu Shixin <[email protected]>
> ---

Applied to clk-next