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

Signed-off-by: Andrey Smirnov <andrew.smir...@gmail.com>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to