From 3e81c2ddb1c0f7f4e2f9ba8f8f54928775d71827 Mon Sep 17 00:00:00 2001 From: Ananth N Mavinakayanahalli Date: Wed, 17 Jun 2015 13:53:41 +0530 Subject: Fix potential NULL pointer dereference Safety check... Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Stewart Smith --- hw/fsp/fsp.c | 2 ++ 1 file changed, 2 insertions(+) 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) { -- cgit v1.1