aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorKamalesh Babulal <kamalesh@linux.vnet.ibm.com>2015-07-09 19:17:06 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-07-10 12:04:57 +1000
commitbb57777a2bf341bec6825adbc03a4c67bbcd7398 (patch)
tree793b188024e708d88619fa0c5c4316b7d967190c /hw
parent1d8c68ff8a83d077ebcd46967e1f581ba2f3135c (diff)
downloadskiboot-bb57777a2bf341bec6825adbc03a4c67bbcd7398.zip
skiboot-bb57777a2bf341bec6825adbc03a4c67bbcd7398.tar.gz
skiboot-bb57777a2bf341bec6825adbc03a4c67bbcd7398.tar.bz2
hw/phb3: Fix logical operand
In phb3_init_rc_cfg(), fix logical operand issue by guarding p->has_link with brackets. Fixes Coverity defect#97816. Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/phb3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/phb3.c b/hw/phb3.c
index e55295b..cdc20e8 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -3674,7 +3674,7 @@ static bool phb3_init_rc_cfg(struct phb3 *p)
/* Note: When link down, also disable rcvr errors */
phb3_pcicfg_write32(&p->phb, 0, aercap + PCIECAP_AER_CE_MASK,
PCIECAP_AER_CE_ADV_NONFATAL |
- p->has_link ? 0 : PCIECAP_AER_CE_RECVR_ERR);
+ (p->has_link ? 0 : PCIECAP_AER_CE_RECVR_ERR));
/* Enable ECRC generation & checking */
phb3_pcicfg_write32(&p->phb, 0, aercap + PCIECAP_AER_CAPCTL,
PCIECAP_AER_CAPCTL_ECRCG_EN |