From: Richard Weinberger Date: Wed, 17 May 2017 08:36:49 +0000 (+0200) Subject: ubifs: Remove dead code from ubifs_get_link() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d2eb85226fcd981767d1829b09ae1070cf695b98;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ubifs: Remove dead code from ubifs_get_link() We check the length already, no need to check later again for an empty string. Signed-off-by: Richard Weinberger --- diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index c1d352842ee2..c58efc1470f3 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -1697,12 +1697,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; }