clk: imx: gate2: Remove unused variable ret
authorZou Wei <zou_wei@huawei.com>
Tue, 3 Nov 2020 11:32:14 +0000 (19:32 +0800)
committerShawn Guo <shawnguo@kernel.org>
Tue, 10 Nov 2020 01:08:03 +0000 (09:08 +0800)
This patch fixes below warning reported by coccicheck:

./clk-gate2.c:57:5-8: Unneeded variable: "ret". Return "0" on line 68

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/clk/imx/clk-gate2.c

index 480a184207d56d02eeb96f03e2e1ab60b03fa10c..f16c4019f402e87a7f3312989e2aa1a544217dc9 100644 (file)
@@ -54,7 +54,6 @@ static int clk_gate2_enable(struct clk_hw *hw)
 {
        struct clk_gate2 *gate = to_clk_gate2(hw);
        unsigned long flags;
-       int ret = 0;
 
        spin_lock_irqsave(gate->lock, flags);
 
@@ -65,7 +64,7 @@ static int clk_gate2_enable(struct clk_hw *hw)
 out:
        spin_unlock_irqrestore(gate->lock, flags);
 
-       return ret;
+       return 0;
 }
 
 static void clk_gate2_disable(struct clk_hw *hw)