Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp364025imm; Fri, 31 Aug 2018 02:29:32 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb3TkNhpErcVixW4ORURqBIHMCoMyRhAlirUHFjydFqDLBnhHchMbMl+zscKZX3hx2klxXY X-Received: by 2002:a63:2b82:: with SMTP id r124-v6mr12128607pgr.159.1535707772552; Fri, 31 Aug 2018 02:29:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535707772; cv=none; d=google.com; s=arc-20160816; b=bCEyppAvBUcJEPGzlL0uo+o7KT6r/bXJ+wBJEbuY82ou56aisBCt3z9L37QSrF4lEI 0MNqHAQDLni/HPL7hD+E/CVjpa0frmg1TSu4hMvEQgBrp7zIwWvqXhNn7D5rXZ25+tKI ebSN0wy1HvQbEpPN62UoRs5EUYauxuz+O6Acwjh47lxOJ7eki3WG4jhMhMusBL6x/6EO yGkujNa5AN5Hsn8GWCTu3DufQ34ZxrEFa721xd7E3S+y2X4geE0eVglqIflttJcA0Ht2 +95Z8uP+QdKuY1ItC6LziHmURNUFKcPaXig44gdbitNKeRbU2antNRToFPZOEWCrEew6 8UeQ== 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:to:from :arc-authentication-results; bh=w3vkruSdoMjxueVxqA7bQb4srXCnUdGcgAjK1GUECiQ=; b=AF5vNZNYLYYTf6wr8y/uW5UAel2kdeSrlpmJzW1tcvu+okUHkQKJHeRYutCDLQHKTi U32J3wmdkPYeFkqp5/fn/8FNaBQzC9uAyW2/RJp9JUUYHmMMLsp6AwssLIzZYf/7KNES U7CIGuRxzbyLEMddaANHJ1fWKMfqCRgHmWz1C2Cp0+931kTCheTgFeSHo79Fv+Z4SM9C s+25TWaAg9yeI3WcE7yeu2BI6KLpbVeg7e7bQ2qKqQ7I0XaTorJfmvpd8yYTlCJ+z7L7 SplccCa6r3Ui4vpcXQ7BNGeFbaCQsuU7fwJX5E+q6kUHcul0ogEIkcQgmKYA0gxIRjiw rPdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w66-v6si10038282pfi.88.2018.08.31.02.29.17; Fri, 31 Aug 2018 02:29:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727871AbeHaMlq (ORCPT + 99 others); Fri, 31 Aug 2018 08:41:46 -0400 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:48968 "EHLO cmccmta2.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727568AbeHaMlp (ORCPT ); Fri, 31 Aug 2018 08:41:45 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.19]) by rmmx-syy-dmz-app06-12006 (RichMail) with SMTP id 2ee65b88fdc401f-7c349; Fri, 31 Aug 2018 16:35:18 +0800 (CST) X-RM-TRANSID: 2ee65b88fdc401f-7c349 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[223.105.0.243]) by rmsmtp-syy-appsvr10-12010 (RichMail) with SMTP id 2eea5b88fdc5729-5ac8b; Fri, 31 Aug 2018 16:35:18 +0800 (CST) X-RM-TRANSID: 2eea5b88fdc5729-5ac8b From: Ding Xiang To: mark@fasheh.com, jlbec@evilplan.org, ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org Subject: [PATCH] ocfs2: Fix unneeded null check Date: Fri, 31 Aug 2018 16:35:14 +0800 Message-Id: <1535704514-26559-1-git-send-email-dingxiang@cmss.chinamobile.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org null check for kfree is unnecessary, so remove it. Signed-off-by: Ding Xiang w --- fs/ocfs2/aops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 302cd7c..da578ad 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -1392,8 +1392,7 @@ static int ocfs2_unwritten_check(struct inode *inode, unlock: spin_unlock(&oi->ip_lock); out: - if (new) - kfree(new); + kfree(new); return ret; } -- 1.9.1