Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34825061rwd; Sun, 9 Jul 2023 21:30:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlEcqW88n4DE1DpR6c62tJMK0H7gnl28eHKXa5M2Ki7mNlNTRlNpJNwIFgqxvpQaysy/SwpE X-Received: by 2002:aa7:c044:0:b0:51d:a124:62db with SMTP id k4-20020aa7c044000000b0051da12462dbmr15189739edo.18.1688963400748; Sun, 09 Jul 2023 21:30:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688963400; cv=none; d=google.com; s=arc-20160816; b=V7V7V2a4Kl5etLFCEJWSbJswMxCOIsEOXHN/iEOvgMqJGOcBfmDkamFMBU7avXCvpk H4E6dYG/IzLHMJ9DA1Ex6K0a1QW+V+FVLiR8soXMNY5ghtzn3LekG6RQz3vW1XxJxKqf JCx9pf7imUi40c7nDeXCVRCK091cCtyvSonlXXB68gkklZqw9Pua+w1yAYK4FANm6Yxf cRrMa/JNCYmUeYtpNki9f4Vsanmgc6ukUT7yGIJWVeVXK0CzVwnBjNHtF5k+beJqah3L /8DL3bD5N3TwVUMJX09DoMqZAgb9K+kj/3rjdnjzYM98c22jXe/pqebqxgvguoj2/rOd H02A== 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=L4zJLwSJP4ogSpuzS5PUfUOoY9+zxP8KSD1nIy+GF8c=; b=jmTjfKXgxR5RVryTKR8bjnmlfGOcqr7JXe9Sew8uebJaAuZj5oLBWRK7swh5n7R7dP zvE769SByo159NIyE9BV1RgtDvzizj96VMYPauPsx85nEJnLH5oA+WvkAuWgNgiktZBq yA9reVyesU32poPOhrYMQGQckiKLhxZaeUPFeoWb7D2+QzHMw3tOYNt27ay52Fxw/qeg IWAmeltxqhAzt0jn4cGcAHYYfWHJZuO487rOpo+tjuDxpDHFktboGd0UYUl0OzLteX42 tkOTd4VEGDbz+3TK1MjQFHY4VA4hiJp6nIYOImqhTXX/ld+8vO6w9XD1a+JMfLTf6szX 7XPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o23-20020aa7c517000000b0051e0c612208si7569633edq.546.2023.07.09.21.29.36; Sun, 09 Jul 2023 21:30:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229659AbjGJDvU (ORCPT + 99 others); Sun, 9 Jul 2023 23:51:20 -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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_24_48, RDNS_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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