From nobody Thu Dec 18 00:59:46 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A78DC71134 for ; Thu, 24 Aug 2023 02:13:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239252AbjHXCNL (ORCPT ); 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:=20Remove=20unnecessary=20=E2=80=98NULL?= =?UTF-8?q?=E2=80=99=20values=20from=20prepared?= 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 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" prepared is assigned first, so it does not need to initialize the=20 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 flag= s, const char __user *filter) { const unsigned long seccomp_mode =3D SECCOMP_MODE_FILTER; - struct seccomp_filter *prepared =3D NULL; + struct seccomp_filter *prepared; long ret =3D -EINVAL; int listener =3D -1; struct file *listener_f =3D NULL; --=20 2.18.2