Commit 7f95bb6a authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

staging: exfat: Fix two missing unlocks on error paths

These two error paths need to unlock before we can return.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20190904095908.GA7007@mwandaSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 512f9922
...@@ -1208,8 +1208,10 @@ static int ffsTruncateFile(struct inode *inode, u64 old_size, u64 new_size) ...@@ -1208,8 +1208,10 @@ static int ffsTruncateFile(struct inode *inode, u64 old_size, u64 new_size)
} else { } else {
while (num_clusters > 0) { while (num_clusters > 0) {
last_clu = clu.dir; last_clu = clu.dir;
if (FAT_read(sb, clu.dir, &clu.dir) == -1) if (FAT_read(sb, clu.dir, &clu.dir) == -1) {
return FFS_MEDIAERR; ret = FFS_MEDIAERR;
goto out;
}
num_clusters--; num_clusters--;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment