lkml.org 
[lkml]   [2021]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH clk-next] drivers/clk: remove unneeded variable make code cleaner
    Date
    From: Minghao Chi <chi.minghao@zte.com.cn>

    return value form directly instead of
    taking this in another redundant variable.

    Reported-by: Zeal Robot <zealci@zte.com.cm>
    Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
    ---
    drivers/clk/mvebu/armada-37xx-tbg.c | 6 ++----
    1 file changed, 2 insertions(+), 4 deletions(-)

    diff --git a/drivers/clk/mvebu/armada-37xx-tbg.c b/drivers/clk/mvebu/armada-37xx-tbg.c
    index 585a02e0b330..fc403ad735ad 100644
    --- a/drivers/clk/mvebu/armada-37xx-tbg.c
    +++ b/drivers/clk/mvebu/armada-37xx-tbg.c
    @@ -87,7 +87,7 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev)
    struct resource *res;
    struct clk *parent;
    void __iomem *reg;
    - int i, ret;
    + int i;

    hw_tbg_data = devm_kzalloc(&pdev->dev,
    struct_size(hw_tbg_data, hws, NUM_TBG),
    @@ -123,9 +123,7 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev)
    dev_err(dev, "Can't register TBG clock %s\n", name);
    }

    - ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, hw_tbg_data);
    -
    - return ret;
    + return of_clk_add_hw_provider(np, of_clk_hw_onecell_get, hw_tbg_data);
    }

    static int armada_3700_tbg_clock_remove(struct platform_device *pdev)
    --
    2.25.1
    \
     
     \ /
      Last update: 2021-12-10 03:45    [W:2.804 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site