aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/chip.c
diff options
context:
space:
mode:
authorJohn Zhao <john.zhao@intel.com>2018-08-21 15:02:54 -0700
committerMartin Roth <martinroth@google.com>2018-08-22 16:39:35 +0000
commitdb2f91b1f7924ce3953358045d17d2e328887a6b (patch)
tree03bf5b94cdfe8d9b374413d80febca6f04f3e919 /src/soc/intel/apollolake/chip.c
parentc65a600b8e297c0ea8cf62fe5d7a854b8f1f2410 (diff)
soc/intel/apollolake: Fix logical vs. bitwise operator
src/soc/intel/apollolake/chip.c Apply bitwise operator instead of logical one. Found-by: Coverity Scan BRANCH=None TEST=Built & booted Yorp board. Change-Id: I36746b04dec889f53c8d7eeb3b1d8118eff1de42 Signed-off-by: John Zhao <john.zhao@intel.com> Reviewed-on: https://review.coreboot.org/28261 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Lijian Zhao <lijian.zhao@intel.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/soc/intel/apollolake/chip.c')
-rw-r--r--src/soc/intel/apollolake/chip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index 83a6baa5f5..9b8cfd7bcf 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -678,7 +678,7 @@ static void configure_xhci_host_mode_port0(void)
cfg0 = (void *)(uintptr_t)(res->base + DUAL_ROLE_CFG0);
cfg1 = (void *)(uintptr_t)(res->base + DUAL_ROLE_CFG1);
reg = read32(cfg0);
- if (!(reg && SW_IDPIN_EN_MASK))
+ if (!(reg & SW_IDPIN_EN_MASK))
return;
reg &= ~(SW_IDPIN_MASK | SW_VBUS_VALID_MASK);