[coreboot-gerrit] Change in coreboot[master]: soc/intel/apollolake: Fix typo in SW_IDPIN_EN_MASK check
Furquan Shaikh (Code Review)
gerrit at coreboot.org
Tue Aug 21 23:39:38 CEST 2018
Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/28259
Change subject: soc/intel/apollolake: Fix typo in SW_IDPIN_EN_MASK check
......................................................................
soc/intel/apollolake: Fix typo in SW_IDPIN_EN_MASK check
This change fixes the check for SW_IDPIN_EN_MASK to use bitwise AND
instead of boolean AND.
Reported by: Coverity CID #1395106
Change-Id: Ib3309eeb2f65f2578dc11a5b93ce9211cb482cb1
Signed-off-by: Furquan Shaikh <furquan at google.com>
---
M src/soc/intel/apollolake/chip.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/28259/1
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index 83a6baa..9b8cfd7 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -678,7 +678,7 @@
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);
--
To view, visit https://review.coreboot.org/28259
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib3309eeb2f65f2578dc11a5b93ce9211cb482cb1
Gerrit-Change-Number: 28259
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180821/26f2de48/attachment-0001.html>
More information about the coreboot-gerrit
mailing list