Skip to contentSkip to conversation

clk: Deduplicate exit code in clk_set_rate

PATCH New Nestor Ovroy 2 participants 2 messages Jan 18, 2013 – Jan 22, 2013 Common clk

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: Deduplicate exit code in clk_set_rate

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

---
 drivers/clk/clk.c |    3 ---
 1 file changed, 3 deletions(-)
drivers/clk/clk.c +0 -3
index 251e45d..0e21d7a 100644
@@ -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;
 }
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 clk: Deduplicate exit code in clk_set_rate

Quoting Nestor Ovroy (2013-01-18 08:07:39)

Quoted 4 lines

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

Nestor,

Thanks for the fix. Taken into clk-next.

Regards,
Mike

Quoted 24 lines
---
 drivers/clk/clk.c |    3 ---
 1 file changed, 3 deletions(-)
drivers/clk/clk.c +0 -3
index 251e45d..0e21d7a 100644
@@ -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;
 }
Signature · 1 line
1.7.10.4