linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/3] btrfs cleanup: remove dead code
@ 2010-03-20 11:26 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-03-20 11:26 UTC (permalink / raw)
  To: Chris Mason
  Cc: Christoph Hellwig, Dan Carpenter, Venkatesh Pallipadi,
	André Goddard Rosa, linux-btrfs, linux-kernel,
	kernel-janitors

rb_node is never an ERR_PTR() here.  This code confuses smatch.

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
This doesn't change anything.  It's just a cleanup.  Could you load
it up for linux-next?

diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index 28d87ba..94668b1 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -335,10 +335,6 @@ struct extent_map *lookup_extent_mapping(struct extent_map_tree *tree,
 		em = NULL;
 		goto out;
 	}
-	if (IS_ERR(rb_node)) {
-		em = ERR_PTR(PTR_ERR(rb_node));
-		goto out;
-	}
 	em = rb_entry(rb_node, struct extent_map, rb_node);
 	if (end > em->start && start < extent_map_end(em))
 		goto found;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-20 11:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-20 11:26 [patch 1/3] btrfs cleanup: remove dead code 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).