diff mbox series

[1/4] fru: ops: Clear fru table before storing data

Message ID e5f15caf9c2102316e39f300d7c9c1ecb6be8439.1645624855.git.michal.simek@xilinx.com
State Accepted
Commit 952b2e60de6d6a80f35878193649b49ae2e14df9
Delegated to: Michal Simek
Headers show
Series xilinx: Fru tool update | expand

Commit Message

Michal Simek Feb. 23, 2022, 2 p.m. UTC
From: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>

Fill fru table with 0's before using it, to avoid junk data.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 board/xilinx/common/fru_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/board/xilinx/common/fru_ops.c b/board/xilinx/common/fru_ops.c
index 6ed63bb7ee11..a0a1441a8eef 100644
--- a/board/xilinx/common/fru_ops.c
+++ b/board/xilinx/common/fru_ops.c
@@ -222,7 +222,7 @@  int fru_capture(unsigned long addr)
 	}
 
 	hdr = (struct fru_common_hdr *)addr;
-
+	memset((void *)&fru_data, 0, sizeof(fru_data));
 	memcpy((void *)&fru_data, (void *)hdr,
 	       sizeof(struct fru_common_hdr));