From: Ashok Reddy Soma Date: Wed, 23 Feb 2022 14:00:56 +0000 (+0100) Subject: fru: ops: Clear fru table before storing data X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=952b2e60de6d6a80f35878193649b49ae2e14df9;p=u-boot.git 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 Signed-off-by: Michal Simek 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 6ed63bb7ee..a0a1441a8e 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));