* [PATCH] kmem_cache_alloc doesn't return ERR_PTR so no need to check for it.
@ 2010-11-13 2:07 Chris Samuel
0 siblings, 0 replies; only message in thread
From: Chris Samuel @ 2010-11-13 2:07 UTC (permalink / raw)
To: linux-btrfs; +Cc: Chris Mason
According to scripts/coccinelle/null/eno.cocci "The various basic
memory allocation functions don't return ERR_PTR" so there's no
point in calling IS_ERR() on the return value from them, the
existing test is good enough.
Signed-off-by: Chris Samuel <chris@csamuel.org>
---
fs/btrfs/extent_map.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index 23cb8da..8797704 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -50,7 +50,7 @@ struct extent_map *alloc_extent_map(gfp_t mask)
{
struct extent_map *em;
em = kmem_cache_alloc(extent_map_cache, mask);
- if (!em || IS_ERR(em))
+ if (!em)
return em;
em->in_tree = 0;
em->flags = 0;
--
1.7.0.4
--
Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-11-13 2:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-13 2:07 [PATCH] kmem_cache_alloc doesn't return ERR_PTR so no need to check for it Chris Samuel
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).