Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1843546imn; Mon, 1 Aug 2022 02:08:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR474cQ7//hyDbKmXdYl7qM3QbqtoXXxcDCAMNksUXkTDh01qxhwkRL6ukssZzF1f9xSr8yx X-Received: by 2002:a17:906:93f0:b0:730:6b07:102d with SMTP id yl16-20020a17090693f000b007306b07102dmr4712423ejb.237.1659344890979; Mon, 01 Aug 2022 02:08:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659344890; cv=none; d=google.com; s=arc-20160816; b=ZwRwYMJN7cXwwqugBrPEyvfGuheSCYMblvzk+NFeRPHPnLvgDckpUOZ5BwDO8xuwuQ UQ3qRT1hjUgn/FcqPq+kewTUbFuZnlqALaD2PUauYbI2JOM6cAd9wIP/SiUy/xvuHdzD 3r9G8olr7p0Oq7IKeYZ9sk2sBH4PUv0K/WvhGd6tE+MaGw1lvza5hU4vgJb2Hqd23dft z6QCBiyt3KRt7EYOgaXoxVpEXdVGNp2ZB/la2XHvb+v9WuAEP4OH6PMVvXmsTFwGviMM 5l/qdMCmwoeWbMy3tRYr/SDmUaXb7H+lRiAok16YoglCyE3I2EY1wWhE3Mo1VS7CakEK EHWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=qynEFaH9DBwuVQdrjoZ4zzOhiWDZCI+0W12DnpwhK6A=; b=Z90YfHgIR+JomIPCWB4PBtPkvzTPTwZVai1YUAOMyKk9hL2sDM18BXE3MAz9WXNEVz nJZl7xicC1FGCejMC5RIonYuoA5ZyvkVIm/w5D5Wp2SLrM6StLmNmc1jX7sMMykN6DeL UzPPJRTbbc1foTmlHM5+9HleBvLmdCcYX79AJrlAxWCS4ZbU5VJg7iCYXkr4VoUZqhTa 5xEqtGdML39Yc0IF0FDvsL9jq68dOQHYu5Sydz899xUqZW9D6krT6+8Bwq49jk+3bJnV Le9b8zuRXlExKBWIDOZOTN6nRoIK4WPIFoQefcQyxazKk68QSupkkJBnQi6TjfjwVkQd Fu/g== 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 f19-20020a50ee93000000b0043b61fc1daasi603314edr.140.2022.08.01.02.07.45; Mon, 01 Aug 2022 02:08:10 -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 S230211AbiHAIvb (ORCPT + 99 others); Mon, 1 Aug 2022 04:51:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229920AbiHAIva (ORCPT ); Mon, 1 Aug 2022 04:51:30 -0400 Received: from mail.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C7C54DF4E; Mon, 1 Aug 2022 01:51:28 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 604F61E80D06; Mon, 1 Aug 2022 16:50:53 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S4LnGvzaf86W; Mon, 1 Aug 2022 16:50:50 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: zeming@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id AFC1F1E80CEA; Mon, 1 Aug 2022 16:50:50 +0800 (CST) From: Li zeming To: mcgrof@kernel.org, keescook@chromium.org, yzaikin@google.com Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Li zeming Subject: [PATCH] proc: remove initialization assignment Date: Mon, 1 Aug 2022 16:51:17 +0800 Message-Id: <20220801085117.4313-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_NONE 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 The allocation address of the core_parent pointer variable is first executed in the function, no initialization assignment is required. Signed-off-by: Li zeming --- fs/proc/proc_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 021e83fe831f..50ba9e4fb284 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -1246,7 +1246,7 @@ static bool get_links(struct ctl_dir *dir, static int insert_links(struct ctl_table_header *head) { struct ctl_table_set *root_set = &sysctl_table_root.default_set; - struct ctl_dir *core_parent = NULL; + struct ctl_dir *core_parent; struct ctl_table_header *links; int err; -- 2.18.2