[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-5.1 v2 39/54] hw/arm/fsl-imx: Add missing error-propagation c
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-5.1 v2 39/54] hw/arm/fsl-imx: Add missing error-propagation code |
Date: |
Mon, 6 Apr 2020 19:47:28 +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 --in-place --dir hw
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/arm/fsl-imx25.c | 8 ++++++++
hw/arm/fsl-imx6.c | 8 ++++++++
2 files changed, 16 insertions(+)
diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
index 3d87fe867e..69d8645dcd 100644
--- a/hw/arm/fsl-imx25.c
+++ b/hw/arm/fsl-imx25.c
@@ -271,8 +271,16 @@ static void fsl_imx25_realize(DeviceState *dev, Error
**errp)
object_property_set_uint(OBJECT(&s->esdhc[i]), 2, "sd-spec-version",
&err);
+ if (err) {
+ error_propagate(errp, err);
+ return;
+ }
object_property_set_uint(OBJECT(&s->esdhc[i]),
IMX25_ESDHC_CAPABILITIES,
"capareg", &err);
+ if (err) {
+ error_propagate(errp, err);
+ return;
+ }
object_property_set_bool(OBJECT(&s->esdhc[i]), true, "realized", &err);
if (err) {
error_propagate(errp, err);
diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c
index b3cef5bb57..c254294a70 100644
--- a/hw/arm/fsl-imx6.c
+++ b/hw/arm/fsl-imx6.c
@@ -343,8 +343,16 @@ static void fsl_imx6_realize(DeviceState *dev, Error
**errp)
/* UHS-I SDIO3.0 SDR104 1.8V ADMA */
object_property_set_uint(OBJECT(&s->esdhc[i]), 3, "sd-spec-version",
&err);
+ if (err) {
+ error_propagate(errp, err);
+ return;
+ }
object_property_set_uint(OBJECT(&s->esdhc[i]), IMX6_ESDHC_CAPABILITIES,
"capareg", &err);
+ if (err) {
+ error_propagate(errp, err);
+ return;
+ }
object_property_set_bool(OBJECT(&s->esdhc[i]), true, "realized", &err);
if (err) {
error_propagate(errp, err);
--
2.21.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH-for-5.1 v2 39/54] hw/arm/fsl-imx: Add missing error-propagation code,
Philippe Mathieu-Daudé <=