From a5923aca821c5b3a5d4980bd7d604062a5215dfc Mon Sep 17 00:00:00 2001 From: Suraj Sonawane Date: Sat, 12 Oct 2024 21:04:41 +0530 Subject: [PATCH] fs: fix uinit Fix the uninitialized symbol Signed-off-by: Suraj Sonawane --- fs/exfat/dir.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index 7446bf09a..6efbb5787 100644 --- a/fs/exfat/dir.c +++ b/fs/exfat/dir.c @@ -791,6 +791,7 @@ static int __exfat_get_dentry_set(struct exfat_entry_set_cache *es, es->modified = false; es->start_off = off; es->bh = es->__bh; + memset(es->__bh, 0, sizeof(es->__bh)); bh = sb_bread(sb, sec); if (!bh) @@ -801,6 +802,12 @@ static int __exfat_get_dentry_set(struct exfat_entry_set_cache *es, struct exfat_dentry *ep; ep = exfat_get_dentry_cached(es, ES_IDX_FILE); + + if (!ep) { + brelse(bh); + return -EIO; + } + if (ep->type != EXFAT_FILE) { brelse(bh); return -EIO; -- 2.34.1