intel/skylake: Init variable so GCC knows it's set

Even though the data32 variable was getting written by
pch_pcr_read(), GCC still flagged it as being used while
uninitialized and failed the build.

Note that pch_pcr_read() may only set 1 or 2 bytes of data32 in the
successful path, depending on the size of the read.

Change-Id: Icd6e80d06b9bf4af506d62d55ffe4c5e98634b2b
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12860
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Ben Gardner <gardner.ben@gmail.com>
This commit is contained in:
Martin Roth 2016-01-07 15:35:45 -07:00
parent 517d4a6a61
commit 19d9fe9ebc
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ static int pcr_and_then_or(u8 pid, u16 offset, u32 size, u32 anddata,
u32 ordata) u32 ordata)
{ {
u8 status; u8 status;
u32 data32; u32 data32 = 0;
status = pch_pcr_read(pid, offset, size, &data32); status = pch_pcr_read(pid, offset, size, &data32);
if (status != 0) if (status != 0)