mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
staging: exfat: Ensure we unlock upon error in ffsReadFile
The call was not releasing the mutex upon error. Reported-by: kbuild test robot <[email protected]> Reported-by: Julia Lawall <[email protected]> Signed-off-by: Davidlohr Bueso <[email protected]> Acked-By: Valdis Kletnieks <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
1 parent
19c1e145a4
commit
6647e4e845
1 file changed
+4
-2
@@ -743,8 +743,10 @@ static int ffsReadFile(struct inode *inode, struct file_id_t *fid, void *buffer,
|
||||
|
||||
while (clu_offset > 0) {
|
||||
/* clu = FAT_read(sb, clu); */
|
||||
if (FAT_read(sb, clu, &clu) == -1)
|
||||
return FFS_MEDIAERR;
|
||||
if (FAT_read(sb, clu, &clu) == -1) {
|
||||
ret = FFS_MEDIAERR;
|
||||
goto out;
|
||||
}
|
||||
|
||||
clu_offset--;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user