public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Anton Altaparmakov <anton@tuxera.com>
Cc: linux-ntfs-dev@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] ntfs: remove an unneeded NULL check
Date: Thu, 19 Jul 2012 11:02:28 +0300	[thread overview]
Message-ID: <20120719080228.GA13792@elgon.mountain> (raw)

The "ctx" variable can never be NULL here and also we dereference it
on the previous line.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
index 7389d2d..4db19f7 100644
--- a/fs/ntfs/file.c
+++ b/fs/ntfs/file.c
@@ -309,8 +309,7 @@ do_non_resident_extend:
 done:
 	flush_dcache_mft_record_page(ctx->ntfs_ino);
 	mark_mft_record_dirty(ctx->ntfs_ino);
-	if (ctx)
-		ntfs_attr_put_search_ctx(ctx);
+	ntfs_attr_put_search_ctx(ctx);
 	if (m)
 		unmap_mft_record(base_ni);
 	ntfs_debug("Done, initialized_size 0x%llx, i_size 0x%llx.",

                 reply	other threads:[~2012-07-19  8:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120719080228.GA13792@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=anton@tuxera.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ntfs-dev@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox