time: hrtimer: Remove unnecessary ‘0’ values from ret

Message ID 20230725195602.3279-1-zeming@nfschina.com
State New
Headers
Series time: hrtimer: Remove unnecessary ‘0’ values from ret |

Commit Message

Li zeming July 25, 2023, 7:56 p.m. UTC
  ret is assigned first, so it does not need to initialize the assignment.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 kernel/time/hrtimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Mukesh Ojha July 24, 2023, 4:06 p.m. UTC | #1
On 7/26/2023 1:26 AM, Li zeming wrote:
> ret is assigned first, so it does not need to initialize the assignment.
> 
> Signed-off-by: Li zeming <zeming@nfschina.com>

Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>

-Mukesh

> ---
>   kernel/time/hrtimer.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
> index e8c08292defc..9f90e76c6cd9 100644
> --- a/kernel/time/hrtimer.c
> +++ b/kernel/time/hrtimer.c
> @@ -2085,7 +2085,7 @@ long hrtimer_nanosleep(ktime_t rqtp, const enum hrtimer_mode mode,
>   {
>   	struct restart_block *restart;
>   	struct hrtimer_sleeper t;
> -	int ret = 0;
> +	int ret;
>   	u64 slack;
>   
>   	slack = current->timer_slack_ns;
  

Patch

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index e8c08292defc..9f90e76c6cd9 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -2085,7 +2085,7 @@  long hrtimer_nanosleep(ktime_t rqtp, const enum hrtimer_mode mode,
 {
 	struct restart_block *restart;
 	struct hrtimer_sleeper t;
-	int ret = 0;
+	int ret;
 	u64 slack;
 
 	slack = current->timer_slack_ns;