[PATCH 1/6] fs: 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/fs.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/fs.c b/fs/fs.c
index 1f6b3d346..65de82518 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -809,9 +809,6 @@ static int fillonedir(struct dir_context *ctx, const char *name, int namlen,
 	struct readdir_entry *entry;
 
 	entry = xzalloc(sizeof(*entry));
-	if (!entry)
-		return -ENOMEM;
-
 	memcpy(entry->d.d_name, name, namlen);
 	list_add_tail(&entry->list, &rd->dir->entries);
 
-- 
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