summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2016-07-18 10:39:55 -0700
committerMartin Roth <martinroth@google.com>2016-07-20 17:08:02 +0200
commitb0672402ecedc7c8ca2e634437c603d73aebf471 (patch)
tree090d71d24c225431f9418876b96db4284194e9e8 /src
parentf9a5d5fa635e80382c444a02b2385014ea1ec77a (diff)
downloadcoreboot-b0672402ecedc7c8ca2e634437c603d73aebf471.tar.gz
coreboot-b0672402ecedc7c8ca2e634437c603d73aebf471.tar.bz2
coreboot-b0672402ecedc7c8ca2e634437c603d73aebf471.zip
soc/intel/quark: Fix legacy GPIO reads
Add missing break to LEG_GPIO_REGS case to return the correct value for legacy GPIO reads. Fixes coverity issue CID 1357460. Found by Coverity, Fixes: * CID 1357460 (#1 of 1): Unused value (UNUSED_VALUE) returned_value: Assigning value from reg_legacy_gpio_read(step->reg) to value here, but that stored value is overwritten before it can be used. value_overwrite: Overwriting previous write to value with value from reg_pcie_afe_read(step->reg). TEST=Build and run on Galileo Gen2. Change-Id: I6c52e8801a32f510ac94276fe0c097850cbfde57 Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/15732 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/quark/reg_access.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/soc/intel/quark/reg_access.c b/src/soc/intel/quark/reg_access.c
index c4688076ed42..25a52ff7627c 100644
--- a/src/soc/intel/quark/reg_access.c
+++ b/src/soc/intel/quark/reg_access.c
@@ -251,6 +251,7 @@ static uint64_t reg_read(struct reg_script_context *ctx)
case LEG_GPIO_REGS:
ctx->display_prefix = "Legacy GPIO";
value = reg_legacy_gpio_read(step->reg);
+ break;
case PCIE_AFE_REGS:
ctx->display_prefix = "PCIe AFE";