2020-09-21 08:05:37

by Liu Shixin

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

Simplify the return expression.

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

diff --git a/drivers/clk/mediatek/clk-mt6797.c b/drivers/clk/mediatek/clk-mt6797.c
index f35389a11af1..428eb24ffec5 100644
--- a/drivers/clk/mediatek/clk-mt6797.c
+++ b/drivers/clk/mediatek/clk-mt6797.c
@@ -582,7 +582,7 @@ CLK_OF_DECLARE_DRIVER(mtk_infra, "mediatek,mt6797-infracfg",

static int mtk_infrasys_init(struct platform_device *pdev)
{
- int r, i;
+ int i;
struct device_node *node = pdev->dev.of_node;

if (!infra_clk_data) {
@@ -599,11 +599,7 @@ static int mtk_infrasys_init(struct platform_device *pdev)
mtk_clk_register_factors(infra_fixed_divs, ARRAY_SIZE(infra_fixed_divs),
infra_clk_data);

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

#define MT6797_PLL_FMAX (3000UL * MHZ)
--
2.25.1


2020-09-22 20:00:38

by Stephen Boyd

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

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

Applied to clk-next