ppc/pnv: check the return value of fd_setprop()
PATCH 1/1 ppc/pnv: check the return value of fd_setprop()
Signed-off-by Cédric Le Goater <[email protected]>
--- hw/ppc/pnv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
hw/ppc/pnv.c +3 -2
@@ -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" )));
Signature · 1 line
2.7.4
David Gibson
AppliedQuoted 1 line · Cédric Le Goater
Signed-off-by Cédric Le Goater <[email protected]>
Applied to ppc-for-2.10, thanks.
Quoted 20 lines
--- hw/ppc/pnv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)hw/ppc/pnv.c +3
-2@@ -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" )));
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson