summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2016-01-07 15:35:45 -0700
committerMartin Roth <martinroth@google.com>2016-01-15 22:41:11 +0100
commit19d9fe9ebc81478b9e7074e9ed6fa8f2070f0004 (patch)
treef9abf7eb6d938f9b1c4fc70294f2fdc4bdd75003
parent517d4a6a61adb15c6edf4675d1e72e474c56f924 (diff)
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>
-rw-r--r--src/soc/intel/skylake/pcr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/intel/skylake/pcr.c b/src/soc/intel/skylake/pcr.c
index b6de73c74c..0b92d769d0 100644
--- a/src/soc/intel/skylake/pcr.c
+++ b/src/soc/intel/skylake/pcr.c
@@ -158,7 +158,7 @@ static int pcr_and_then_or(u8 pid, u16 offset, u32 size, u32 anddata,
u32 ordata)
{
u8 status;
- u32 data32;
+ u32 data32 = 0;
status = pch_pcr_read(pid, offset, size, &data32);
if (status != 0)