summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlif Zakuan Yuslaimi <[email protected]>2025-08-17 19:55:02 -0700
committerTom Rini <[email protected]>2025-09-09 10:30:51 -0600
commita3f0a8e7a1be4843363967e63d8e5c7b725ce2fc (patch)
tree274888755924d57b9c5c4cd4b33d4bf7693066a7
parente0f9a4fb576c3f4233393194161e48941823cbc3 (diff)
misc: fs_loader: Initialize actread variable
Initialize the actread variable to prevent undefined behavior that can occur if the variable is used before being assigned a value. This will help to prevent potential issues, especially if actread is used (e.g., read, incremented, or returned) before being explicitly set elsewhere in the code. Signed-off-by: Alif Zakuan Yuslaimi <[email protected]>
-rw-r--r--drivers/misc/fs_loader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c
index 60296d55f23..1fdfd8636e0 100644
--- a/drivers/misc/fs_loader.c
+++ b/drivers/misc/fs_loader.c
@@ -148,7 +148,7 @@ static int _request_firmware_prepare(struct udevice *dev,
*/
static int fw_get_filesystem_firmware(struct udevice *dev)
{
- loff_t actread;
+ loff_t actread = 0;
char *storage_interface, *dev_part, *ubi_mtdpart, *ubi_volume;
int ret;