diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2014-01-10 12:22:51 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2014-01-10 12:22:51 +1100 |
commit | e2e8f85097c00873fe750410b767af93adef9edd (patch) | |
tree | 1cd62b23fe28530ef67f908f46cd98d29e2f9f98 /fs | |
parent | 3954c33bc561fb2fac8eeaf31810b2f827775fc3 (diff) | |
parent | 88c305912db5d50e2b2568e22119b9ee3b56ad88 (diff) |
Merge remote-tracking branch 'l2-mtd/master'
Diffstat (limited to 'fs')
-rw-r--r-- | fs/jffs2/malloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/jffs2/malloc.c b/fs/jffs2/malloc.c index 4f47aa24b556..b8fd651307a4 100644 --- a/fs/jffs2/malloc.c +++ b/fs/jffs2/malloc.c @@ -288,6 +288,8 @@ struct jffs2_xattr_datum *jffs2_alloc_xattr_datum(void) struct jffs2_xattr_datum *xd; xd = kmem_cache_zalloc(xattr_datum_cache, GFP_KERNEL); dbg_memalloc("%p\n", xd); + if (!xd) + return NULL; xd->class = RAWNODE_CLASS_XATTR_DATUM; xd->node = (void *)xd; @@ -306,6 +308,8 @@ struct jffs2_xattr_ref *jffs2_alloc_xattr_ref(void) struct jffs2_xattr_ref *ref; ref = kmem_cache_zalloc(xattr_ref_cache, GFP_KERNEL); dbg_memalloc("%p\n", ref); + if (!ref) + return NULL; ref->class = RAWNODE_CLASS_XATTR_REF; ref->node = (void *)ref; |