Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f95bb6a authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

staging: exfat: Fix two missing unlocks on error paths



These two error paths need to unlock before we can return.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20190904095908.GA7007@mwanda


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 512f9922
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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--;
			}
		}