diff mbox series

[PULL,1/2] xlnx-bbram: hw/nvram: Fix uninitialized Error *

Message ID 20220405092651.725041-2-peter.maydell@linaro.org
State New
Headers show
Series [PULL,1/2] xlnx-bbram: hw/nvram: Fix uninitialized Error * | expand

Commit Message

Peter Maydell April 5, 2022, 9:26 a.m. UTC
From: Tong Ho <tong.ho@xilinx.com>

This adds required initialization of Error * variable.

Signed-off-by: Tong Ho <tong.ho@xilinx.com>
Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/nvram/xlnx-bbram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/nvram/xlnx-bbram.c b/hw/nvram/xlnx-bbram.c
index b70828e5bf1..6ed32adad9f 100644
--- a/hw/nvram/xlnx-bbram.c
+++ b/hw/nvram/xlnx-bbram.c
@@ -89,7 +89,7 @@  static bool bbram_pgm_enabled(XlnxBBRam *s)
 
 static void bbram_bdrv_error(XlnxBBRam *s, int rc, gchar *detail)
 {
-    Error *errp;
+    Error *errp = NULL;
 
     error_setg_errno(&errp, -rc, "%s: BBRAM backstore %s failed.",
                      blk_name(s->blk), detail);