diff --git a/board/xilinx/common/fru.h b/board/xilinx/common/fru.h index a3e6520257..e85dde4531 100644 --- a/board/xilinx/common/fru.h +++ b/board/xilinx/common/fru.h @@ -53,9 +53,9 @@ struct fru_board_data { }; struct fru_table { - bool captured; struct fru_common_hdr hdr; struct fru_board_data brd; + bool captured; }; #define FRU_TYPELEN_CODE_MASK 0xC0 diff --git a/board/xilinx/common/fru_ops.c b/board/xilinx/common/fru_ops.c index fc3add7d93..affcb121aa 100644 --- a/board/xilinx/common/fru_ops.c +++ b/board/xilinx/common/fru_ops.c @@ -217,7 +217,7 @@ int fru_capture(unsigned long addr) hdr = (struct fru_common_hdr *)addr; - memcpy((void *)&fru_data.hdr, (void *)hdr, + memcpy((void *)&fru_data, (void *)hdr, sizeof(struct fru_common_hdr)); fru_data.captured = true;