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>
This commit is contained in:
parent
512f9922ee
commit
7f95bb6aa3
@ -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--;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user