diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-08-30 21:46:44 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-03 10:36:07 +0300 |
commit | 076a8e2f769e870cc8eedda746fdc8a9aa0c11f9 (patch) | |
tree | 1cf92fe0e0bfae4fc1af79da3c6f5c6e5c728fc5 /drivers/staging | |
parent | ef16b89c8243f8407938e5f3e2134444338c1b45 (diff) | |
download | linux-076a8e2f769e870cc8eedda746fdc8a9aa0c11f9.tar.xz |
staging: exfat: fix uninitialized variable ret
Currently there are error return paths in ffsReadFile that
exit via lable err_out that return and uninitialized error
return in variable ret. Fix this by initializing ret to zero.
Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: c48c9f7ff32b ("staging: exfat: add exfat filesystem code to staging")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>,
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Link: https://lore.kernel.org/r/20190830184644.15590-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/exfat/exfat_super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index 15970b34e38f..aaebd40ee6f3 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -779,7 +779,7 @@ static int ffsReadFile(struct inode *inode, struct file_id_t *fid, void *buffer, { s32 offset, sec_offset, clu_offset; u32 clu; - int ret; + int ret = 0; sector_t LogSector; u64 oneblkread, read_bytes; struct buffer_head *tmp_bh = NULL; |