[Skiboot] [RFC Coverity PATCH 1/2] hw/p7ioc-phb.c: Fix assignment of addr
Kamalesh Babulal
kamalesh at linux.vnet.ibm.com
Wed Jul 1 15:04:27 AEST 2015
In p7ioc_err_inject_io32() addr is passed as an argument.
Based on its value , we have a conditional check(s).
Re-assigning the addr to 0x0ull, make the whole branching
check(s) a dead code.
Remove the re-assignment of addr, to fix the issue.
Fixes Coverity defect#101020.
Signed-off-by: Kamalesh Babulal <kamalesh at linux.vnet.ibm.com>
Cc: Gavin Shan <gwshan at linux.vnet.ibm.com>
---
hw/p7ioc-phb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/p7ioc-phb.c b/hw/p7ioc-phb.c
index 0b37993..5167832 100644
--- a/hw/p7ioc-phb.c
+++ b/hw/p7ioc-phb.c
@@ -1409,7 +1409,6 @@ static int64_t p7ioc_err_inject_io32(struct p7ioc_phb *p, uint32_t pe_no,
int32_t index;
a = 0x0ull;
- addr = 0x0ull;
prefer = 0x0ull;
for (index = 0; index < 128; index++) {
if (GETFIELD(IODA_XXDT_PE, p->iod_cache[index]) != pe_no)
--
2.1.2
More information about the Skiboot
mailing list