xlnx-bbram: hw/nvram: Fix uninitialized Error *
authorTong Ho <tong.ho@xilinx.com>
Fri, 1 Apr 2022 19:06:31 +0000 (12:06 -0700)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 5 Apr 2022 08:28:04 +0000 (09:28 +0100)
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

index b70828e5bf1562bcaa15410eb016d70748c05555..6ed32adad9fca73c1b511e7cc22d86606ba26350 100644 (file)
@@ -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);