lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20120719080228.GA13792@elgon.mountain>
Date:	Thu, 19 Jul 2012 11:02:28 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Anton Altaparmakov <anton@...era.com>
Cc:	linux-ntfs-dev@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: [patch] ntfs: remove an unneeded NULL check

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

Signed-off-by: Dan Carpenter <dan.carpenter@...cle.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.",
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ