Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1580429rdh; Mon, 25 Sep 2023 18:21:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHG59QGhKOguTFbLZFOaQeBW/Iv/BCfe+GHNDHC4KtaHo1P8bfsxQ3Fnfgx4hCwmVe41RW X-Received: by 2002:a05:6870:a983:b0:1be:f23f:99b with SMTP id ep3-20020a056870a98300b001bef23f099bmr10136226oab.42.1695691307802; Mon, 25 Sep 2023 18:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695691307; cv=none; d=google.com; s=arc-20160816; b=CB1dGIEd+oW+EGeuqTs5wa1fde/4s5RrGzd+U1Rhev3DR2bmLI0+IJi3cdCH3u1wGO nNpxjhsNzpTSvqtLAct0tljMmYHw0GDJG3VF0yN7rVMPhs/W2F/CoBTIIBt80f/zxlkX VqtXOI27aj2JZpG79y0WRyScF75GjpCqjPTY0uce2Pd0EWF0hV5fCrrRJYOY67vC5nFr UzUy6xXhdmQ6PEwbBk1fEVE60yFoD/HF7IPdb44oH+W+Fs0du09h4BmHyLhf/Jy8js/k 4PCzG1y3vmvlrsZ1p7kihzzN+CRrW0PN3f8aKO6fLG+kpxQFrhggQj1/FMAy6uYF5jAm t22w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=eKgCfje1Ax/3UDGGmWbdqh0ei2AcZXg71FfXk1M72rI=; fh=LzvCeX1kuqDjAXP9dI4IzjeiZr1WK44jllmrJVBQRDc=; b=iGjyKKFrDAbaY/ArVL8F9WEzyv0/JCxgfkBAkWujEH2rRXStxmZK9ugZRk8DGjpdYZ orRykY6nQ6GxSR3F4td+t1wLdwAeVFgSE0KAVPCl1USuxG8UMOZe/bFTqJqs4Af1VBtX JjILeDBx0CCELosFNSQRnU9lsjbEnm0pqmsFbwSfbfmuXdGtSivNSGWcLandlWVFSb/c omLaYX9QmBEb2VttYe+1uNnuicyndjlC6U0ffUznyD5O9RJ9aQpE+i3xrz0PVDgyc4Tg QfgNdiRLXWdUPcY4ZVAcsNYGNiUbhLQUrbu+V1Q1aPnUZR6kFcorpObA6vec9wkRfxyJ +Xbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id k70-20020a638449000000b00577f6b56757si11295688pgd.495.2023.09.25.18.21.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 18:21:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 3976180A99B8; Mon, 25 Sep 2023 18:20:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232893AbjIZBUd (ORCPT + 99 others); Mon, 25 Sep 2023 21:20:33 -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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 25 Sep 2023 18:20:34 -0700 (PDT) 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, 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