diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-09-02 12:40:52 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-03 10:36:07 +0300 |
commit | be22bc7ceb5f4a713924c2ccaa9db1c27992b739 (patch) | |
tree | b02674d0612b64f1e379e2ae93eceba1f5825bd7 /drivers/staging/exfat | |
parent | 076a8e2f769e870cc8eedda746fdc8a9aa0c11f9 (diff) | |
download | linux-be22bc7ceb5f4a713924c2ccaa9db1c27992b739.tar.xz |
staging: exfat: remove return and error return via a goto
The return statement is incorrect, the error exit should be by
assigning ret with the error code and exiting via label out.
Thanks to Valdis Klētnieks for correcting my original fix.
Addresses-Coverity: ("Structurally dead code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190902094052.28029-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/exfat')
-rw-r--r-- | drivers/staging/exfat/exfat_super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index aaebd40ee6f3..881cd85cf677 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -670,7 +670,7 @@ static int ffsLookupFile(struct inode *inode, char *path, struct file_id_t *fid) dentry = p_fs->fs_func->find_dir_entry(sb, &dir, &uni_name, num_entries, &dos_name, TYPE_ALL); if (dentry < -1) { - return FFS_NOTFOUND; + ret = FFS_NOTFOUND; goto out; } |