summaryrefslogtreecommitdiffstats
path: root/hw/ipmi/ipmi-fru.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ipmi/ipmi-fru.c')
-rw-r--r--hw/ipmi/ipmi-fru.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/ipmi/ipmi-fru.c b/hw/ipmi/ipmi-fru.c
index be3ca907..ddcb3d6f 100644
--- a/hw/ipmi/ipmi-fru.c
+++ b/hw/ipmi/ipmi-fru.c
@@ -213,6 +213,8 @@ static int fru_write(void)
*/
msg = ipmi_mkmsg(IPMI_DEFAULT_INTERFACE, IPMI_WRITE_FRU,
fru_write_complete, NULL, NULL, FRU_DATA_SIZE + 5, 2);
+ if (!msg)
+ return OPAL_RESOURCE;
msg->data[0] = fru_dev_id; /* FRU Device ID */
msg->data[1] = 0x0; /* Offset LSB (we always write a new common header) */
OpenPOWER on IntegriCloud