From nobody Sun Feb 8 00:12:02 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B386EB64D9 for ; Mon, 10 Jul 2023 03:51:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229827AbjGJDvV (ORCPT ); Sun, 9 Jul 2023 23:51:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjGJDvS (ORCPT ); Sun, 9 Jul 2023 23:51:18 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id B9C81C3 for ; Sun, 9 Jul 2023 20:51:15 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id D9840602A09B1; Mon, 10 Jul 2023 11:51:05 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: rafael.j.wysocki@intel.com, kai.heng.feng@canonical.com, dmitry.osipenko@collabora.com Cc: linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?UTF-8?q?kernel:=20reboot:=20Remove=20unnecessary=20?= =?UTF-8?q?=E2=80=980=E2=80=99=20values=20from=20ret?= Date: Wed, 12 Jul 2023 04:21:45 +0800 Message-Id: <20230711202145.5138-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" ret is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming Reviewed-by: Randy Dunlap --- 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, unsig= ned int, cmd, { struct pid_namespace *pid_ns =3D task_active_pid_ns(current); char buffer[256]; - int ret =3D 0; + int ret; =20 /* We only trust the superuser with rebooting the system. */ if (!ns_capable(pid_ns->user_ns, CAP_SYS_BOOT)) --=20 2.18.2