From patchwork Fri Aug 25 18:43:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li zeming X-Patchwork-Id: 136742 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a7d1:0:b0:3f2:4152:657d with SMTP id p17csp846714vqm; Wed, 23 Aug 2023 19:37:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGqYhRhjN7KhmUwzVPfHtl2EzJQNPZtUInRq9p0ut/8oBBEqAoIZG5t2KmUTo7q4+Qnmidq X-Received: by 2002:a05:6402:398:b0:525:6e47:10f6 with SMTP id o24-20020a056402039800b005256e4710f6mr11125544edv.22.1692844667891; Wed, 23 Aug 2023 19:37:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692844667; cv=none; d=google.com; s=arc-20160816; b=GQbbCz0Hhpv2HPrceEpI7cIh8bTDIE4jjjsXq6eEqtbD2kxt5+WPJKQMYf4b+dl7d8 lgkaeJnbHjg3ZpbhHy87Zz3uPuH7gADQNmvfveBfGlNvdadDtyHyLseTgyi3Hn3zsmEF IMEnfhEUrT+J28ZE6KB9HIBkmp48Oj8XzZN6S1LRDOWDOZluDIW1pyMWDVgFOsZv0iEk oF09MCrWoQe5xpVf93ZeNWqbakSTgCu0+tLByn+19tEXvh1W4sB16xTGJI+4dksoYtd5 +/mfAIBxazTpK6GwDP6AwV95clJasUK3zYdA+lCvL0xktRifAY0kjeJsRzgd4ONojN9M NCnQ== 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=Y36UBie1rpc5np5vBBAu/diL4rbkNTP5knQ2qFn8c40=; fh=rTG7RyPkAArQUhls0c/890pJ0mjfP7SrZjLjk/47+VA=; b=G5c1AyghAW1aqkOyJGW7rvzeC0AN9XJyUkq/MDphVYOpL6Ov7rKfrRD+WyAn+QpA4Z t26vE3Y7tbWOOR1umGSqzboo+Ik2h8asVpNG4vJMYBo+9F1JqRx3oi3iNrsya0aHijgP lCnmdKeIJNOv1svWV1p9aCpb9LnDonAOf+xgaUyMdnrOX/qpEzyNJydFf8f+QYvaYdFd zI7rrb5wIC2mY0cZjY18QgpJ6MU7QKoG5lm70j4pRfiYv7X8n8LKBLbzYUbD73JgvYmr 0dhsTKTgD/rDi9lurIuvyyZPKX5fSrXiHlgysg7c58iIEm0JeQzDtqghcWlQiNQlB3K5 /4jQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020a05640208c800b0052a0e1f9f81si5918230edz.2.2023.08.23.19.37.11; Wed, 23 Aug 2023 19:37:47 -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 S239250AbjHXCNL (ORCPT + 99 others); Wed, 23 Aug 2023 22:13:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239238AbjHXCMj (ORCPT ); Wed, 23 Aug 2023 22:12:39 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id D82F8E77 for ; Wed, 23 Aug 2023 19:12:36 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id C132D60AA07D4; Thu, 24 Aug 2023 10:12:33 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: keescook@chromium.org, luto@amacapital.net, wad@chromium.org Cc: linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?utf-8?q?seccomp=3A_Remove_unnecessary_=E2=80=98NULL?= =?utf-8?q?=E2=80=99_values_from_prepared?= Date: Sat, 26 Aug 2023 02:43:48 +0800 Message-Id: <20230825184348.6870-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Spam-Status: No, score=4.3 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_24_48, RCVD_IN_SBL_CSS,RDNS_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: **** 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775076290345808920 X-GMAIL-MSGID: 1775076290345808920 prepared is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- kernel/seccomp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/seccomp.c b/kernel/seccomp.c index d3e584065c7f..af672e03449a 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c @@ -1838,7 +1838,7 @@ static long seccomp_set_mode_filter(unsigned int flags, const char __user *filter) { const unsigned long seccomp_mode = SECCOMP_MODE_FILTER; - struct seccomp_filter *prepared = NULL; + struct seccomp_filter *prepared; long ret = -EINVAL; int listener = -1; struct file *listener_f = NULL;