aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnanth N Mavinakayanahalli <ananth@in.ibm.com>2015-06-17 13:53:41 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-06-19 07:37:36 +1000
commit3e81c2ddb1c0f7f4e2f9ba8f8f54928775d71827 (patch)
treed0da95901585971b4869a6a9a4eeb89624c12e65
parent0cb7dba2eb6158366fe78db7163fde37638d230b (diff)
downloadskiboot-3e81c2ddb1c0f7f4e2f9ba8f8f54928775d71827.zip
skiboot-3e81c2ddb1c0f7f4e2f9ba8f8f54928775d71827.tar.gz
skiboot-3e81c2ddb1c0f7f4e2f9ba8f8f54928775d71827.tar.bz2
Fix potential NULL pointer dereference
Safety check... Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hw/fsp/fsp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c
index 12e162d..9a27a6f 100644
--- a/hw/fsp/fsp.c
+++ b/hw/fsp/fsp.c
@@ -1799,6 +1799,8 @@ static void fsp_init_links(struct dt_node *fsp_node)
struct fsp_iopath *fiop;
linksprop = dt_find_property(fsp_node, "ibm,psi-links");
+ assert(linksprop);
+
index = dt_prop_get_u32(fsp_node, "reg");
fsp = fsp_find_by_index(index);
if (!fsp) {