From: Cédric Le Goater Date: Mon, 5 Jun 2017 15:44:21 +0000 (+0200) Subject: ppc/pnv: check the return value of fdt_setprop() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7032d92ac83c13987be302b96ab1f26d4b0f404e;p=qemu.git ppc/pnv: check the return value of fdt_setprop() Signed-off-by: Cédric Le Goater [dwg: Correct typo in commit message] Signed-off-by: David Gibson --- diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 231ed9735b..89b6801f67 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -378,8 +378,9 @@ static void powernv_populate_ipmi_bt(ISADevice *d, void *fdt, int lpc_off) _FDT(node); g_free(name); - fdt_setprop(fdt, node, "reg", io_regs, sizeof(io_regs)); - fdt_setprop(fdt, node, "compatible", compatible, sizeof(compatible)); + _FDT((fdt_setprop(fdt, node, "reg", io_regs, sizeof(io_regs)))); + _FDT((fdt_setprop(fdt, node, "compatible", compatible, + sizeof(compatible)))); /* Mark it as reserved to avoid Linux trying to claim it */ _FDT((fdt_setprop_string(fdt, node, "status", "reserved")));