Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2955740rdg; Mon, 16 Oct 2023 23:08:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGxe+oelrNkqfsGcfp6Kkt+6c4vB/0kMCI+rMlWbS5vtiV7UPHSGYYafc/kVpJF6/a5AacN X-Received: by 2002:a17:903:2309:b0:1c6:2ae1:dc28 with SMTP id d9-20020a170903230900b001c62ae1dc28mr1399548plh.36.1697522937923; Mon, 16 Oct 2023 23:08:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697522937; cv=none; d=google.com; s=arc-20160816; b=zvakSueXVJAz9ias5xguLlowyH6Vwi+86kQTSFptmhfjmJd8zkjYHytoQ+bobtpOYl ojE7QL+Upo9ZJp+MgXoTrY8XAECY7Od4LRSZlpnXstEi63SfGic6+7TKKwyjHHQQ4gXa gP5YFni4TbpgqRkC/sqHVmT92cezR9m02Ayo5Epjz0RqGcm1FQZ0c4nJUIBg/4U+zXqO TsJKXHvW/y/+NNZbQ4WnVly37r2fU8riiMt3J1WEnm74LTiDiuGbRu2Y2eQhS2pEWXJv hiWfAO9D8NTTqDafwL3HcoOh9/lPL69GsQRKvX3XDtc3lfWo8NOZN+8axZ6tMROlBuNd w/Iw== 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=XcDfGqBPbATUxYY5w9Jp1R5ZLGWesMN/TD0qVldg9Fo=; fh=GSIBOmdhrT9ROZ/+r/0ZNMx4Up5jYpxe09fcPpk5r1w=; b=JZOdi98jilEQIY0Ar7svL2W924BRVUumlmJ6NKhybIKR1UDm1fVnrckB1AtKaU8Aje XmeXt5M/YJQfzXWul/eDVlb0Fj7SmlbDsJ1n7WOypieLcpuZ+k7ijfMxNk9LhZNI28Zs Nz1E8GpbzQ+pLwAF4Dd5kJWtPsQtd1G63xlCZoE2q7yhKhyik4lEqpgdAFT2gm+/A44M 6oUeoy7NsmgVvG3AA6DuenDNJnHRz0P28pkq3+7xaiX5zgWX4kVYH+bsm6N+V5ZB+kLS a/zXC0BU9n3iJoCB3sR9Vhl0nHdj04VeT667YFPhZxPf5Gy5EoVw3eekY/nhOrpWWtWu LqFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id 5-20020a170902e9c500b001b9e2ce5723si1048375plk.495.2023.10.16.23.08.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 23:08:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id CB04F808650D; Mon, 16 Oct 2023 23:08:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234426AbjJQGIm (ORCPT + 99 others); Tue, 17 Oct 2023 02:08:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230343AbjJQGIl (ORCPT ); Tue, 17 Oct 2023 02:08:41 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id CFCC5AB for ; Mon, 16 Oct 2023 23:08:39 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id C5CC46027B14C; Tue, 17 Oct 2023 14:08:25 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: gor@linux.ibm.com, mark.rutland@arm.com, hca@linux.ibm.com Cc: linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?UTF-8?q?stackleak:=20Remove=20unnecessary=20=E2=80=980?= =?UTF-8?q?=E2=80=99=20values=20from=20ret?= Date: Tue, 17 Oct 2023 14:08:24 +0800 Message-Id: <20231017060824.10434-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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 16 Oct 2023 23:08:56 -0700 (PDT) ret is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- kernel/stackleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/stackleak.c b/kernel/stackleak.c index 34c9d81eea940..3faf863593846 100644 --- a/kernel/stackleak.c +++ b/kernel/stackleak.c @@ -24,7 +24,7 @@ static DEFINE_STATIC_KEY_FALSE(stack_erasing_bypass); static int stack_erasing_sysctl(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { - int ret = 0; + int ret; int state = !static_branch_unlikely(&stack_erasing_bypass); int prev_state = state; -- 2.18.2