[PATCH 6/6] ubifs: Remove dead code from ubifs_get_link()
From: Richard Weinberger
Date: Wed May 17 2017 - 04:37:39 EST
We check the length already, no need to check later
again for an empty string.
Signed-off-by: Richard Weinberger <richard@xxxxxx>
---
fs/ubifs/file.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index 2cda3d67e2d0..ccb7a1279fd5 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -1698,12 +1698,6 @@ static const char *ubifs_get_link(struct dentry *dentry,
pstr.name[pstr.len] = '\0';
- // XXX this probably won't happen anymore...
- if (pstr.name[0] == '\0') {
- fscrypt_fname_free_buffer(&pstr);
- return ERR_PTR(-ENOENT);
- }
-
set_delayed_call(done, kfree_link, pstr.name);
return pstr.name;
}
--
2.12.0