diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-09-04 12:59:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-04 19:14:45 +0200 |
commit | 7f95bb6aa3dd4f732edb05fe64b255b27bcc97d2 (patch) | |
tree | 5145b77de07073bf8f274b37aac6aa32ca379331 /drivers/staging | |
parent | 512f9922eeb1e5b0b1e099fd56829e1dad993437 (diff) | |
download | linux-7f95bb6aa3dd4f732edb05fe64b255b27bcc97d2.tar.bz2 |
staging: exfat: Fix two missing unlocks on error paths
These two error paths need to unlock before we can return.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20190904095908.GA7007@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/exfat/exfat_super.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index 0cd93b9742a6..95bb606766b6 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -1208,8 +1208,10 @@ static int ffsTruncateFile(struct inode *inode, u64 old_size, u64 new_size) } else { while (num_clusters > 0) { last_clu = clu.dir; - if (FAT_read(sb, clu.dir, &clu.dir) == -1) - return FFS_MEDIAERR; + if (FAT_read(sb, clu.dir, &clu.dir) == -1) { + ret = FFS_MEDIAERR; + goto out; + } num_clusters--; } } |