[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-5.1 v2 45/54] hw/net/xilinx_axienet: Add missing error-propag
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-5.1 v2 45/54] hw/net/xilinx_axienet: Add missing error-propagation code |
Date: |
Mon, 6 Apr 2020 19:47:34 +0200 |
Patch created mechanically by running:
$ spatch \
--macro-file scripts/cocci-macro-file.h --include-headers \
--sp-file scripts/coccinelle/object_property_missing_error_propagate.cocci \
--keep-comments --smpl-spacing --dir hw
Then review showed this file has a 'xilinx_enet_realize_fail'
label that calls error_propagate(). Updated the patch to use
the label.
Reviewed-by: Alistair Francis <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
v2: New cocci patch generated both transformations
(Peter noticed v1 only catched one)
---
hw/net/xilinx_axienet.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c
index 704788811a..db2c675b16 100644
--- a/hw/net/xilinx_axienet.c
+++ b/hw/net/xilinx_axienet.c
@@ -958,6 +958,9 @@ static void xilinx_enet_realize(DeviceState *dev, Error
**errp)
object_property_allow_set_link,
OBJ_PROP_LINK_STRONG,
&local_err);
+ if (local_err) {
+ goto xilinx_enet_realize_fail;
+ }
object_property_add_link(OBJECT(cs), "enet", "xlnx.axi-ethernet",
(Object **) &cs->enet,
object_property_allow_set_link,
@@ -967,6 +970,9 @@ static void xilinx_enet_realize(DeviceState *dev, Error
**errp)
goto xilinx_enet_realize_fail;
}
object_property_set_link(OBJECT(ds), OBJECT(s), "enet", &local_err);
+ if (local_err) {
+ goto xilinx_enet_realize_fail;
+ }
object_property_set_link(OBJECT(cs), OBJECT(s), "enet", &local_err);
if (local_err) {
goto xilinx_enet_realize_fail;
--
2.21.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH-for-5.1 v2 45/54] hw/net/xilinx_axienet: Add missing error-propagation code,
Philippe Mathieu-Daudé <=