Message ID | 1484433744.12241.99.camel@neuling.org |
---|---|
State | Superseded |
Headers | show |
diff --git a/hw/lpc-mbox.c b/hw/lpc-mbox.c index 0ffc5e97d6..7818943864 100644 --- a/hw/lpc-mbox.c +++ b/hw/lpc-mbox.c @@ -118,6 +118,11 @@ static void bmc_mbox_send_message(struct bmc_mbox_msg *msg) int bmc_mbox_enqueue(struct bmc_mbox_msg *msg) { int rc = 0; + + /* In case mbox is not inited */ + if (!mbox.base) + return -1; + lock(&mbox.lock); if (mbox.queue_len == MBOX_MAX_QUEUE_LEN) { rc = -1;