From nobody Fri Feb 13 10:59:09 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 C81EDE81808 for ; Tue, 26 Sep 2023 01:20:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232536AbjIZBUe (ORCPT ); Mon, 25 Sep 2023 21:20:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231225AbjIZBUc (ORCPT ); Mon, 25 Sep 2023 21:20:32 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 0AC5211F for ; Mon, 25 Sep 2023 18:20:24 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 0CFE1604DE359; Tue, 26 Sep 2023 09:20:07 +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/reboot:=20Remove=20unnecessary=20?= =?UTF-8?q?=E2=80=980=E2=80=99=20values=20from=20ret?= Date: Tue, 26 Sep 2023 09:20:00 +0800 Message-Id: <20230926012000.28012-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 --- 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