aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2016-07-06 13:20:03 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-07-20 18:18:07 +1000
commitd0030c1a39eb1ef47f01d5557a1d45a642cc1518 (patch)
tree01a91d5568a630adeebec1edd82506e320e00425
parentb804319cb345f2291f0316a083322d84b46993ae (diff)
downloadskiboot-d0030c1a39eb1ef47f01d5557a1d45a642cc1518.zip
skiboot-d0030c1a39eb1ef47f01d5557a1d45a642cc1518.tar.gz
skiboot-d0030c1a39eb1ef47f01d5557a1d45a642cc1518.tar.bz2
hw/npu: assert() on PHB device node
This uses assert() to assure the PHB device node is created successfully as we never hit the failing case as I image, to simplify the code. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hw/npu.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/hw/npu.c b/hw/npu.c
index be07e20..65db17f 100644
--- a/hw/npu.c
+++ b/hw/npu.c
@@ -1303,17 +1303,7 @@ static void npu_probe_phb(struct dt_node *dn)
/* Create PCI root device node */
np = dt_new_addr(dt_root, "pciex", at_bar[0]);
- if (!np) {
- /**
- * @fwts-label NPUPHBDeviceNodeFailure
- * @fwts-advice Error adding the PHB device node. The
- * only real reason for this is that firmware may have
- * run out of memory.
- */
- prlog(PR_ERR, "%s: Cannot create PHB device node\n",
- __func__);
- return;
- }
+ assert(np);
dt_add_property_strings(np, "compatible",
"ibm,power8-npu-pciex", "ibm,ioda2-npu-phb");