[PATCH 2/6] fs: ramfs: Drop needless OOM check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Drop needless OOM check since xzalloc() will never return NULL.

Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 fs/ramfs.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/ramfs.c b/fs/ramfs.c
index 4fba40d31..3046afef3 100644
--- a/fs/ramfs.c
+++ b/fs/ramfs.c
@@ -403,8 +403,6 @@ static struct inode *ramfs_alloc_inode(struct super_block *sb)
 	struct ramfs_inode *node;
 
 	node = xzalloc(sizeof(*node));
-	if (!node)
-		return NULL;
 
 	return &node->inode;
 }
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux