diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2019-11-03 10:09:21 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-03 19:40:09 +0100 |
commit | 6647e4e84501e7f935f108729da9a6fd60924d8b (patch) | |
tree | 6181ad7a1d6129951c5a57c5f5f24f4ad7195d71 /drivers/staging/exfat | |
parent | 19c1e145a436ac316f1556ebc229f08f333bc60c (diff) | |
download | linux-6647e4e84501e7f935f108729da9a6fd60924d8b.tar.gz linux-6647e4e84501e7f935f108729da9a6fd60924d8b.tar.bz2 linux-6647e4e84501e7f935f108729da9a6fd60924d8b.zip |
staging: exfat: Ensure we unlock upon error in ffsReadFile
The call was not releasing the mutex upon error.
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Acked-By: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Link: https://lore.kernel.org/r/20191103180921.2844-1-dave@stgolabs.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/exfat')
-rw-r--r-- | drivers/staging/exfat/exfat_super.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index 5f972588669c..1ae5a7750348 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -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--; } |