Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3376364pxa; Tue, 25 Aug 2020 21:03:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzg4VFKep8i6hl8qlKKdfyF4ndlwNcn/yMlZjmB7fpQ0UJdXolPr0oMjCk7hKOsH9iI9z/ X-Received: by 2002:a17:906:150b:: with SMTP id b11mr13658429ejd.234.1598414581730; Tue, 25 Aug 2020 21:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598414581; cv=none; d=google.com; s=arc-20160816; b=Jtm7uEMtKucnWU/j/wotlFqK6AfjBfZD6alGL/1HTPXCoJ2XMGZBWJHNto/4WOqN4T 2rjvSFMeOCTyJpBoHX73U+UePKXtiaN+Mb6hGrl90jBKmXnGuqSRDIIjkJPdm6TsXUtS vh1abME5ThcsTzmbixuPVS6kqKDlNPyYjJ6cq8AxtzWcOgkB5mtUkPg1/v9v0fnznT0O iRxZ28+nmuT6462XaQOCitx886lvcibi5FFS2Bj3BZCQzRLhUsJtCVMZlhq1Kd6pBXDA 5FelGTl+RdWaM/5EAZJGhnMstKui60ELzk2LyZOp+fbjg/XiGyIeGJaDLeE5/eK2xwBo WR6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=OjgrZesxYJxlBbX9y9wGDAv0CkLvWEoIbiEN5yJZgvY=; b=bDdgDi9Qrb/jAXZYxrML/UJIzyBsBnj25c4lKewW+tiFNtz32ZJelafLEtbc8YefG0 KWKxthb4WL5+3araW57TQS5EosJca6AaSrijKYZipV8lPpSqPkDsR57RICoEzLh2b7Ah Tz+MYNuF4kxqowpnXDwVmFGlaMVDkHcbKts8HPIS7IVTbiwkb8ZQxIm0Jg5RunN7P2i6 mlvokHrpsuDxFEr+MFwFV1olROu9LbNBLTbQVcFuiFthZ3Z2p9zQNGlP/THGTwE/ju6p aw9iAskWX8RU1/Go252sWjPNLhHFvnIiXEY1Tg4WH254JVM41+DjXkdmLB24tP6EmYAA vwRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q11si744669ejb.101.2020.08.25.21.02.38; Tue, 25 Aug 2020 21:03:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726074AbgHZEAk (ORCPT + 99 others); Wed, 26 Aug 2020 00:00:40 -0400 Received: from smtp25.cstnet.cn ([159.226.251.25]:44540 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725267AbgHZEAj (ORCPT ); Wed, 26 Aug 2020 00:00:39 -0400 Received: from localhost.localdomain (unknown [159.226.5.100]) by APP-05 (Coremail) with SMTP id zQCowAAnLqJZ3kVfbRZbBQ--.30057S2; Wed, 26 Aug 2020 12:00:25 +0800 (CST) From: Xu Wang To: paul@paul-moore.com, eparis@redhat.com Cc: linux-audit@redhat.com, linux-kernel@vger.kernel.org Subject: [PATCH] audit: Remove redundant null check Date: Wed, 26 Aug 2020 04:00:22 +0000 Message-Id: <20200826040022.5297-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: zQCowAAnLqJZ3kVfbRZbBQ--.30057S2 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUY57k0a2IF6w1UM7kC6x804xWl14x267AK xVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUJVWUGw A2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r1I 6r4UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Gr 1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Cr1j6rxdM2AIxVAIcxkEcVAq07x20xvE ncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r45tVCq3wAv7V C2z280aVAFwI0_ZcC_Gr8dMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCY 02Avz4vE14v_Gryl42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxV Aqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r12 6r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6x kF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWrJr0_WFyUJwCI42IY6I8E87Iv 67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf 9x07juxRDUUUUU= X-Originating-IP: [159.226.5.100] X-CM-SenderInfo: pyxotu46lvutnvoduhdfq/1tbiCwYAA1z4jY5PiwAAst Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Because kfree_skb already checked NULL skb parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang --- kernel/audit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/audit.c b/kernel/audit.c index 7efaece534a9..144e1e9322a5 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -934,8 +934,7 @@ static void audit_free_reply(struct audit_reply *reply) if (!reply) return; - if (reply->skb) - kfree_skb(reply->skb); + kfree_skb(reply->skb); if (reply->net) put_net(reply->net); kfree(reply); -- 2.17.1