diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-02-26 11:52:58 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-02-27 08:35:08 +0100 |
commit | fd52d8e23b0f9eb4f05677fd5974944ffaca4bfd (patch) | |
tree | 5bc1b7a3815861ec2e07f914faaf2ca07ae99f0b /fs | |
parent | b91cf003a12485202c136e8b951f2ae67ab6e6a4 (diff) | |
download | barebox-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.c | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -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); |