lkml.org 
[lkml]   [2023]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] reboot: Remove unnecessary ‘0 ’ values from ret
Date
ret is assigned first, so it does not need to initialize the
assignment.

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

diff --git a/kernel/reboot.c b/kernel/reboot.c
index 3bba88c7ffc6..e00a02a74694 100644
--- a/kernel/reboot.c
+++ b/kernel/reboot.c
@@ -702,7 +702,7 @@ SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd,
{
struct pid_namespace *pid_ns = task_active_pid_ns(current);
char buffer[256];
- int ret = 0;
+ int ret;

/* We only trust the superuser with rebooting the system. */
if (!ns_capable(pid_ns->user_ns, CAP_SYS_BOOT))
--
2.18.2
\
 
 \ /
  Last update: 2023-09-19 04:07    [W:0.020 / U:2.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site