Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Colin Ian King and committed by
Greg Kroah-Hartman
be22bc7c 076a8e2f

+1 -1
+1 -1
drivers/staging/exfat/exfat_super.c
··· 670 670 dentry = p_fs->fs_func->find_dir_entry(sb, &dir, &uni_name, num_entries, 671 671 &dos_name, TYPE_ALL); 672 672 if (dentry < -1) { 673 - return FFS_NOTFOUND; 673 + ret = FFS_NOTFOUND; 674 674 goto out; 675 675 } 676 676