diff mbox

clk: Deduplicate exit code in clk_set_rate

Message ID 1358525259-7979-1-git-send-email-novroy@riseup.net (mailing list archive)
State New, archived
Headers show

Commit Message

Nestor Ovroy Jan. 18, 2013, 4:07 p.m. UTC
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@riseup.net>
---
 drivers/clk/clk.c |    3 ---
 1 file changed, 3 deletions(-)

Comments

Mike Turquette Jan. 22, 2013, 4:38 p.m. UTC | #1
Quoting Nestor Ovroy (2013-01-18 08:07:39)
> 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@riseup.net>

Nestor,

Thanks for the fix.  Taken into clk-next.

Regards,
Mike

> ---
>  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
diff mbox

Patch

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;
 }