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>
This commit is contained in:
Lee Leahy 2016-07-18 10:39:55 -07:00 committed by Martin Roth
parent f9a5d5fa63
commit b0672402ec
1 changed files with 1 additions and 0 deletions

View File

@ -251,6 +251,7 @@ static uint64_t reg_read(struct reg_script_context *ctx)
case LEG_GPIO_REGS: case LEG_GPIO_REGS:
ctx->display_prefix = "Legacy GPIO"; ctx->display_prefix = "Legacy GPIO";
value = reg_legacy_gpio_read(step->reg); value = reg_legacy_gpio_read(step->reg);
break;
case PCIE_AFE_REGS: case PCIE_AFE_REGS:
ctx->display_prefix = "PCIe AFE"; ctx->display_prefix = "PCIe AFE";