Message ID | 1366973262-2730-1-git-send-email-sachin.kamat@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <ocfs2-devel-bounces@oss.oracle.com> X-Original-To: patchwork-ocfs2-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1FA89C0319 for <patchwork-ocfs2-devel@patchwork.kernel.org>; Thu, 1 Aug 2013 07:28:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1B62720233 for <patchwork-ocfs2-devel@patchwork.kernel.org>; Thu, 1 Aug 2013 07:28:17 +0000 (UTC) Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C9FC820272 for <patchwork-ocfs2-devel@patchwork.kernel.org>; Thu, 1 Aug 2013 07:28:15 +0000 (UTC) Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r717S17f001666 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Aug 2013 07:28:02 GMT Received: from oss.oracle.com (oss-external.oracle.com [137.254.96.51]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r717S0Vs003846 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Aug 2013 07:28:00 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from <ocfs2-devel-bounces@oss.oracle.com>) id 1V4nIm-0005fK-FE; Thu, 01 Aug 2013 00:28:00 -0700 Received: from ucsinet21.oracle.com ([156.151.31.93]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from <sachin.kamat@linaro.org>) id 1UVgO5-00029U-Ur for ocfs2-devel@oss.oracle.com; Fri, 26 Apr 2013 04:00:22 -0700 Received: from userp1020.oracle.com (userp1020.oracle.com [156.151.31.79]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r3QB0LGw012807 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <ocfs2-devel@oss.oracle.com>; Fri, 26 Apr 2013 11:00:21 GMT Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by userp1020.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r3QB05dk010922 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for <ocfs2-devel@oss.oracle.com>; Fri, 26 Apr 2013 11:00:06 GMT Received: by mail-pd0-f181.google.com with SMTP id q10so36871pdj.26 for <ocfs2-devel@oss.oracle.com>; Fri, 26 Apr 2013 04:00:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=r2+/6Vq0rLjeURBL/aQQZY9lQJuEzIeTbeNxeI74Qsk=; b=XNICDHy5LWsryy82XoHHpTfbsUX+f+ecYA8QV8P16MZWhbQoEG9waj1Y5dsnbixcjF nx8Roh9D3/j0W0ba4/pxAUC3R8k3AgVG4nnkoRApXxLfxmhuA1v76tdgDQ5wmbDcUMaI OfNUzxAi6LG8vl9MYJFJCAMOCbn37jPL9py0iBZ3SfTZg3lSXXq1IlmWrjf0CdDc/Wns QMKhUCVXOY76e/dZzJSLTRoTSXo7yEQFw/MSCx8xzRl8ngBTNg10so3TjztW9AsIVyYZ yYO5itrxLlnSX6TIfDTLumMLihGoVWXYgXP8OvQHrXLOnkpu3agtN8Qxhb1kgC4tXSG+ v+6w== X-Received: by 10.68.90.197 with SMTP id by5mr16565470pbb.196.1366974019915; Fri, 26 Apr 2013 04:00:19 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id vk7sm11239081pbc.41.2013.04.26.04.00.17 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Apr 2013 04:00:19 -0700 (PDT) From: Sachin Kamat <sachin.kamat@linaro.org> To: ocfs2-devel@oss.oracle.com Date: Fri, 26 Apr 2013 16:17:42 +0530 Message-Id: <1366973262-2730-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQkT+S8vgFZbgxqYtuVr4VJdHPoLfRHaqLzMbCXcUIpTjuPcPunxxLGvord/5yRYyfmutkwF X-Flow-Control-Info: class=Pass-to-MM reputation=ipRisk-All ip=209.85.192.181 ct-class=R5 ct-vol1=-93 ct-vol2=8 ct-vol3=7 ct-risk=59 ct-spam1=100 ct-spam2=7 ct-bulk=2 rcpts=1 size=620 X-Sendmail-CM-Score: 0.00% X-Sendmail-CM-Analysis: v=2.0 cv=EdPhsYaC c=1 sm=1 a=Y3g9H0QKSQ6t1mUjF4L38w==:17 a=nPUJLSDsYekA:10 a=Dd51h76s3LkA:10 a=KKAkSRfTAAAA:8 a=HjunDXpxXhgA:10 a=cu8yM9HPafgvg8RAxKQA:9 a=WwgC8nHKvroA:10 a=hefqDoz8KgZhZfddZ6GK3A==:117 X-Sendmail-CT-Classification: not spam X-Sendmail-CT-RefID: str=0001.0A090209.517A5E44.0183, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-Mailman-Approved-At: Thu, 01 Aug 2013 00:27:57 -0700 Cc: sachin.kamat@linaro.org, mfasheh@suse.com Subject: [Ocfs2-devel] [PATCH 1/1] ocfs2/dlm: Remove redundant null pointer check X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: <ocfs2-devel.oss.oracle.com> List-Unsubscribe: <https://oss.oracle.com/mailman/listinfo/ocfs2-devel>, <mailto:ocfs2-devel-request@oss.oracle.com?subject=unsubscribe> List-Archive: <http://oss.oracle.com/pipermail/ocfs2-devel> List-Post: <mailto:ocfs2-devel@oss.oracle.com> List-Help: <mailto:ocfs2-devel-request@oss.oracle.com?subject=help> List-Subscribe: <https://oss.oracle.com/mailman/listinfo/ocfs2-devel>, <mailto:ocfs2-devel-request@oss.oracle.com?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index ba1e689..5f9e476 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c @@ -1498,10 +1498,8 @@ leave: dlm_put(dlm); if (ret < 0) { - if (buf) - kfree(buf); - if (item) - kfree(item); + kfree(buf); + kfree(item); mlog_errno(ret); }
kfree on a NULL pointer is a no-op. Hence remove the redundant null pointer check. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> --- fs/ocfs2/dlm/dlmrecovery.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)