[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH-for-5.1 v3 11/23] hw/pci-host/pnv_phb3: Add missing error-pro
From: |
David Gibson |
Subject: |
Re: [PATCH-for-5.1 v3 11/23] hw/pci-host/pnv_phb3: Add missing error-propagation code |
Date: |
Tue, 14 Apr 2020 12:12:03 +1000 |
On Mon, Apr 13, 2020 at 12:41:32AM +0200, Philippe Mathieu-Daudé wrote:
> Patch created mechanically by running:
>
> $ spatch \
> --macro-file scripts/cocci-macro-file.h --include-headers \
> --sp-file scripts/coccinelle/use-error_propagate-in-realize.cocci \
> --keep-comments --smpl-spacing --in-place --dir hw
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Acked-by: David Gibson <address@hidden>
> ---
> hw/pci-host/pnv_phb3.c | 24 ++++++++++++++++++++----
> 1 file changed, 20 insertions(+), 4 deletions(-)
>
> diff --git a/hw/pci-host/pnv_phb3.c b/hw/pci-host/pnv_phb3.c
> index 57d717ed23..a9029f5a02 100644
> --- a/hw/pci-host/pnv_phb3.c
> +++ b/hw/pci-host/pnv_phb3.c
> @@ -1008,7 +1008,11 @@ static void pnv_phb3_realize(DeviceState *dev, Error
> **errp)
>
> /* LSI sources */
> object_property_set_link(OBJECT(&phb->lsis), OBJECT(pnv), "xics",
> - &error_abort);
> + &local_err);
> + if (local_err) {
> + error_propagate(errp, local_err);
> + return;
> + }
> object_property_set_bool(OBJECT(&phb->lsis), true, "realized",
> &local_err);
> if (local_err) {
> error_propagate(errp, local_err);
> @@ -1023,9 +1027,17 @@ static void pnv_phb3_realize(DeviceState *dev, Error
> **errp)
>
> /* MSI sources */
> object_property_set_link(OBJECT(&phb->msis), OBJECT(phb), "phb",
> - &error_abort);
> + &local_err);
> + if (local_err) {
> + error_propagate(errp, local_err);
> + return;
> + }
> object_property_set_link(OBJECT(&phb->msis), OBJECT(pnv), "xics",
> - &error_abort);
> + &local_err);
> + if (local_err) {
> + error_propagate(errp, local_err);
> + return;
> + }
> object_property_set_bool(OBJECT(&phb->msis), true, "realized",
> &local_err);
> if (local_err) {
> error_propagate(errp, local_err);
> @@ -1034,7 +1046,11 @@ static void pnv_phb3_realize(DeviceState *dev, Error
> **errp)
>
> /* Power Bus Common Queue */
> object_property_set_link(OBJECT(&phb->pbcq), OBJECT(phb), "phb",
> - &error_abort);
> + &local_err);
> + if (local_err) {
> + error_propagate(errp, local_err);
> + return;
> + }
> object_property_set_bool(OBJECT(&phb->pbcq), true, "realized",
> &local_err);
> if (local_err) {
> error_propagate(errp, local_err);
--
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
signature.asc
Description: PGP signature
- [PATCH-for-5.1 v3 05/23] hw/arm/allwinner-a10: Add missing error-propagation code, (continued)
- [PATCH-for-5.1 v3 05/23] hw/arm/allwinner-a10: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 04/23] hw/arm/aspeed: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 06/23] hw/arm/msf2-soc: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 07/23] hw/riscv/sifive: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 08/23] hw/arm/armv7m: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 09/23] hw/intc/arm_gicv3_its_kvm: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 11/23] hw/pci-host/pnv_phb3: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- Re: [PATCH-for-5.1 v3 11/23] hw/pci-host/pnv_phb3: Add missing error-propagation code,
David Gibson <=
- [PATCH-for-5.1 v3 10/23] hw/microblaze/xlnx-zynqmp-pmu: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 12/23] hw/block/onenand: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 13/23] scripts/coccinelle: Add script to catch missing error_propagate() calls, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 14/23] hw/arm/bcm2835_peripherals: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 15/23] hw/arm/fsl-imx: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 16/23] hw/arm/stm32fx05_soc: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 17/23] hw/dma/xilinx_axidma: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 18/23] hw/i386/x86: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 v3 19/23] hw/mips/cps: Add missing error-propagation code, Philippe Mathieu-Daudé, 2020/04/12