From: Shivang Upadhyay Date: Tue, 28 Oct 2025 08:05:50 +0000 (+0530) Subject: hw/ppc: Fix missing return on allocation failure X-Git-Tag: v10.2.0-rc1~31^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a0ebccf92463549f75b82ec106889268156171f;p=thirdparty%2Fqemu.git hw/ppc: Fix missing return on allocation failure Fixes coverity (CID 1642026) Cc: Aditya Gupta Cc: Harsh Prateek Bora Link: https://lore.kernel.org/qemu-devel/CAFEAcA-SPmsnU1wzsWxBcFC=ZM_DDhPEg1N4iX9Q4bL1xOnwBg@mail.gmail.com/ Reported-by: Peter Maydell Suggested-by: Peter Maydell Signed-off-by: Shivang Upadhyay Reviewed-by: Harsh Prateek Bora Signed-off-by: Harsh Prateek Bora Link: https://lore.kernel.org/r/20251028080551.92722-2-shivangu@linux.ibm.com Message-ID: <20251028080551.92722-2-shivangu@linux.ibm.com> --- diff --git a/hw/ppc/spapr_fadump.c b/hw/ppc/spapr_fadump.c index fa3aeac94c..883a60cdcf 100644 --- a/hw/ppc/spapr_fadump.c +++ b/hw/ppc/spapr_fadump.c @@ -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);