From patchwork Tue Feb 12 18:23:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 219934 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0E2B62C0085 for ; Wed, 13 Feb 2013 05:24:01 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933484Ab3BLSXi (ORCPT ); Tue, 12 Feb 2013 13:23:38 -0500 Received: from mail.tpi.com ([70.99.223.143]:3395 "EHLO mail.tpi.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933551Ab3BLSXh (ORCPT ); Tue, 12 Feb 2013 13:23:37 -0500 Received: from salmon.rtg.net (mail.tpi.com [70.99.223.143]) by mail.tpi.com (Postfix) with ESMTP id A03F13315E6; Tue, 12 Feb 2013 10:23:36 -0800 (PST) Received: by salmon.rtg.net (Postfix, from userid 1000) id 5AEDA203BE; Tue, 12 Feb 2013 11:23:36 -0700 (MST) From: Tim Gardner To: linux-kernel@vger.kernel.org Cc: Tim Gardner , Andrew Morton , Jan Kara , linux-ext4@vger.kernel.org Subject: [PATCH linux-next] jbd: start_this_handle(): remove kfree() redundant null check Date: Tue, 12 Feb 2013 11:23:24 -0700 Message-Id: <1360693404-61617-1-git-send-email-tim.gardner@canonical.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org smatch analysis: fs/jbd/transaction.c:236 start_this_handle() info: redundant null check on new_transaction calling kfree() Cc: Andrew Morton Cc: Jan Kara Cc: linux-ext4@vger.kernel.org Signed-off-by: Tim Gardner --- fs/jbd/transaction.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 071d690..ee40b4e 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c @@ -232,8 +232,7 @@ repeat_locked: lock_map_acquire(&handle->h_lockdep_map); out: - if (unlikely(new_transaction)) /* It's usually NULL */ - kfree(new_transaction); + kfree(new_transaction); return ret; }