summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-02-26 11:52:58 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-02-27 08:35:08 +0100
commitfd52d8e23b0f9eb4f05677fd5974944ffaca4bfd (patch)
tree5bc1b7a3815861ec2e07f914faaf2ca07ae99f0b /fs
parentb91cf003a12485202c136e8b951f2ae67ab6e6a4 (diff)
downloadbarebox-fd52d8e23b0f9eb4f05677fd5974944ffaca4bfd.tar.gz
barebox-fd52d8e23b0f9eb4f05677fd5974944ffaca4bfd.tar.xz
fs: Drop needless OOM check
Drop needless OOM check since xzalloc() will never return NULL. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/fs.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/fs.c b/fs/fs.c
index 1f6b3d3462..65de825181 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);