[PATCH] clk: Deduplicate exit code in clk_set_rate

Nestor Ovroy novroy at riseup.net
Fri Jan 18 11:07:39 EST 2013


On non-out case 'return ret;' is equivalent to 'return 0;' as the ret
variable is initialized at 0 and never changed.

Signed-off-by: Nestor Ovroy <novroy at riseup.net>
---
 drivers/clk/clk.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 251e45d..0e21d7a 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -948,13 +948,10 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
 	}
 
 	/* change the rates */
 	clk_change_rate(top);
 
-	mutex_unlock(&prepare_lock);
-
-	return 0;
 out:
 	mutex_unlock(&prepare_lock);
 
 	return ret;
 }
-- 
1.7.10.4




More information about the linux-arm-kernel mailing list