summaryrefslogtreecommitdiffstats
path: root/hw/fsp
diff options
context:
space:
mode:
authorAnanth N Mavinakayanahalli <ananth@in.ibm.com>2015-06-17 13:53:47 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-06-19 07:37:36 +1000
commit58ffd37475ede29575479854da94dd12782168e3 (patch)
tree3b8e16c6c1b4693908b51388b172cbc1e8ead339 /hw/fsp
parent3e81c2ddb1c0f7f4e2f9ba8f8f54928775d71827 (diff)
downloadblackbird-skiboot-58ffd37475ede29575479854da94dd12782168e3.tar.gz
blackbird-skiboot-58ffd37475ede29575479854da94dd12782168e3.zip
Fix potential NULL pointer dereference
Safety check... Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/fsp')
-rw-r--r--hw/fsp/fsp-nvram.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/fsp/fsp-nvram.c b/hw/fsp/fsp-nvram.c
index 257cdd63..2d518f3f 100644
--- a/hw/fsp/fsp-nvram.c
+++ b/hw/fsp/fsp-nvram.c
@@ -271,6 +271,8 @@ static bool fsp_nvram_get_size(uint32_t *out_size)
int rc, size;
msg = fsp_mkmsg(FSP_CMD_GET_VNVRAM_SIZE, 0);
+ assert(msg);
+
rc = fsp_sync_msg(msg, false);
size = msg->resp ? msg->resp->data.words[0] : 0;
fsp_freemsg(msg);
OpenPOWER on IntegriCloud