commit | 5cb4d0397b155c0faf8f12e40411b7f63a7cdc4a | [log] [tgz] |
---|---|---|
author | Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> | Wed Feb 23 15:00:56 2022 +0100 |
committer | Michal Simek <michal.simek@xilinx.com> | Mon Mar 07 08:48:21 2022 +0100 |
tree | 95b309686d737c2a46d5f2f01cd757c8b7806be1 | |
parent | 6b6b05afcb043520b4960052b582c05cc6044a9e [diff] [blame] |
fru: ops: Clear fru table before storing data 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> Link: https://lore.kernel.org/r/e5f15caf9c2102316e39f300d7c9c1ecb6be8439.1645624855.git.michal.simek@xilinx.com
diff --git a/board/xilinx/common/fru_ops.c b/board/xilinx/common/fru_ops.c index 6ed63bb..a0a1441 100644 --- a/board/xilinx/common/fru_ops.c +++ b/board/xilinx/common/fru_ops.c
@@ -222,7 +222,7 @@ } 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));