Commit 6647e4e8 authored by Davidlohr Bueso's avatar Davidlohr Bueso Committed by Greg Kroah-Hartman

staging: exfat: Ensure we unlock upon error in ffsReadFile

The call was not releasing the mutex upon error.
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarDavidlohr Bueso <dave@stgolabs.net>
Acked-By: default avatarValdis Kletnieks <valdis.kletnieks@vt.edu>
Link: https://lore.kernel.org/r/20191103180921.2844-1-dave@stgolabs.netSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 19c1e145
...@@ -743,8 +743,10 @@ static int ffsReadFile(struct inode *inode, struct file_id_t *fid, void *buffer, ...@@ -743,8 +743,10 @@ static int ffsReadFile(struct inode *inode, struct file_id_t *fid, void *buffer,
while (clu_offset > 0) { while (clu_offset > 0) {
/* clu = FAT_read(sb, clu); */ /* clu = FAT_read(sb, clu); */
if (FAT_read(sb, clu, &clu) == -1) if (FAT_read(sb, clu, &clu) == -1) {
return FFS_MEDIAERR; ret = FFS_MEDIAERR;
goto out;
}
clu_offset--; clu_offset--;
} }
......
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