]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/ppc: Fix missing return on allocation failure
authorShivang Upadhyay <shivangu@linux.ibm.com>
Tue, 28 Oct 2025 08:05:50 +0000 (13:35 +0530)
committerHarsh Prateek Bora <harshpb@linux.ibm.com>
Thu, 30 Oct 2025 08:07:10 +0000 (13:37 +0530)
Fixes coverity (CID 1642026)

Cc: Aditya Gupta <adityag@linux.ibm.com>
Cc: Harsh Prateek Bora <harshpb@linux.ibm.com>
Link: https://lore.kernel.org/qemu-devel/CAFEAcA-SPmsnU1wzsWxBcFC=ZM_DDhPEg1N4iX9Q4bL1xOnwBg@mail.gmail.com/
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Shivang Upadhyay <shivangu@linux.ibm.com>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Link: https://lore.kernel.org/r/20251028080551.92722-2-shivangu@linux.ibm.com
Message-ID: <20251028080551.92722-2-shivangu@linux.ibm.com>

hw/ppc/spapr_fadump.c

index fa3aeac94cb7fb86c58f79bad162822d96d73705..883a60cdcf20759a197ef1280fb22fb9aa8d998d 100644 (file)
@@ -234,6 +234,7 @@ static bool do_preserve_region(FadumpSection *region)
         qemu_log_mask(LOG_GUEST_ERROR,
             "FADump: Failed allocating memory (size: %zu) for copying"
             " reserved memory regions\n", FADUMP_CHUNK_SIZE);
+        return false;
     }
 
     num_chunks = ceil((src_len * 1.0f) / FADUMP_CHUNK_SIZE);