Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2538782rwb; Sun, 4 Sep 2022 18:54:33 -0700 (PDT) X-Google-Smtp-Source: AA6agR5e8wwHt+OzVQlv/qgsSZRMf6ebir3mFZv1Bzf9hw5k3j8qGo6O5eUUd3SWNkVI3T2DhINb X-Received: by 2002:a17:902:7249:b0:175:4643:f85c with SMTP id c9-20020a170902724900b001754643f85cmr22790097pll.31.1662342872937; Sun, 04 Sep 2022 18:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662342872; cv=none; d=google.com; s=arc-20160816; b=Hk3pJVqzt0QeK58AhowZe4uEkA1oXX0lAkvvceabCILVfJzcgHHCgK7W+b1EPVLwxZ AWxyT2x67uqPgqadDv5VGeROnWoHfNldSni64VlJ4twYjeb6w2SE/n3oAJk+1DPQCw9e dNZWwMGoDtF6cZnC0Oww07u66mbnmmsaaChNzAZBMmHyCMtm4qnDSjxnFVh+w+hlusaV 1ed+UupiGlbWFyN77lzIR53Z6XF9o2G0V6899/qFVYCHGtrk1yfem764gO9l3YXhzTEm DnI9coHM3DAz4OqfkqDkt0MqmHVcCgN4QFUq0LzEFgn7w5NArlnDznGmDK3xAmrW/mVN 8rHQ== 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=b/1KNndx8qhrV6qplujNwljp08+xpI27WLFYBeav0uk=; b=f1colkZPHa1snfnNBSI5NlMauSepVhLJnZ13Xuq58fyZhPAiLGkYO1s/RMpxNozMop VlVMgbq2Evkur8PYXmmazBr3X65c1iyRYnFNmRBzxkS0ANDXR0D/NVDnfgg0iRT6oj1b Ip0ZjPUrioD+YQaay/DZab802jRwtGPtxYGRWVsm9dd6bQbifC+5/oqyV+NGoIwUB+kK 8ylo9yw/CImdOUWieIvBUjIEHIIlEfDyr4jLnivsbc6SVYD00Q29q5cZ2jWuUtDjYqwT 5fmGvgAqcSw3kpB16/epX4cGj3AIjO13wWjHORkaAhi+oF+OVaVbBLBvgEfVODY6KVwY WDjg== 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 s18-20020a17090302d200b00176988304easi4110262plk.91.2022.09.04.18.54.13; Sun, 04 Sep 2022 18:54:32 -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 S234994AbiIEBVa (ORCPT + 99 others); Sun, 4 Sep 2022 21:21:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230013AbiIEBV3 (ORCPT ); Sun, 4 Sep 2022 21:21:29 -0400 Received: from mail.nfschina.com (mail.nfschina.com [124.16.136.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B046828E02 for ; Sun, 4 Sep 2022 18:21:28 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 0B85E1E80D74; Mon, 5 Sep 2022 09:20:34 +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 VlII1Ahj_rUB; Mon, 5 Sep 2022 09:20:31 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: zeming@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 680311E80D59; Mon, 5 Sep 2022 09:20:31 +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/proc_sysctl: Remove unnecessary 'NULL' values from Pointer Date: Mon, 5 Sep 2022 09:21:10 +0800 Message-Id: <20220905012110.2946-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Pointer variables allocate memory first, and then judge. There is no need to initialize the assignment. 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