diff mbox series

[-next] clk: imx: gate2: Remove unused variable ret

Message ID 1604403134-32814-1-git-send-email-zou_wei@huawei.com (mailing list archive)
State Awaiting Upstream, archived
Headers show
Series [-next] clk: imx: gate2: Remove unused variable ret | expand

Commit Message

Zou Wei Nov. 3, 2020, 11:32 a.m. UTC
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>
---
 drivers/clk/imx/clk-gate2.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Stephen Boyd Nov. 5, 2020, 1:32 a.m. UTC | #1
Quoting Zou Wei (2020-11-03 03:32:14)
> 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>
Shawn Guo Nov. 10, 2020, 1:09 a.m. UTC | #2
On Tue, Nov 03, 2020 at 07:32:14PM +0800, Zou Wei wrote:
> 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>

Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/clk/imx/clk-gate2.c b/drivers/clk/imx/clk-gate2.c
index 480a184..f16c401 100644
--- a/drivers/clk/imx/clk-gate2.c
+++ b/drivers/clk/imx/clk-gate2.c
@@ -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)