* [patch] ntfs: remove an unneeded NULL check
@ 2012-07-19 8:02 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2012-07-19 8:02 UTC (permalink / raw)
To: Anton Altaparmakov; +Cc: linux-ntfs-dev, linux-kernel, kernel-janitors
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.",
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-07-19 8:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-19 8:02 [patch] ntfs: remove an unneeded NULL check Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).