[Qemu-devel] [PATCH] ppc/pnv: check the return value of fd_setprop()

Cédric Le Goater posted 1 patch 8 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1496677461-22320-1-git-send-email-clg@kaod.org
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
hw/ppc/pnv.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
[Qemu-devel] [PATCH] ppc/pnv: check the return value of fd_setprop()
Posted by Cédric Le Goater 8 years, 8 months ago
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 hw/ppc/pnv.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 231ed9735b65..89b6801f67b5 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")));
-- 
2.7.4


Re: [Qemu-devel] [PATCH] ppc/pnv: check the return value of fd_setprop()
Posted by David Gibson 8 years, 8 months ago
On Mon, Jun 05, 2017 at 05:44:21PM +0200, Cédric Le Goater wrote:
> Signed-off-by: Cédric Le Goater <clg@kaod.org>

Applied to ppc-for-2.10, thanks.

> ---
>  hw/ppc/pnv.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> index 231ed9735b65..89b6801f67b5 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")));

-- 
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