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:
Davidlohr Bueso authored and Greg Kroah-Hartman committed 2019-11-03 19:40:09 +01:00
1 parent 19c1e145a4
commit 6647e4e845
1 file changed
+4 -2
+4 -2
View File
@@ -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--;
}