[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/30] accel: Remove WHPX unreachable error path
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 14/30] accel: Remove WHPX unreachable error path |
Date: |
Wed, 28 Jun 2023 17:52:57 +0200 |
g_new0() can not fail. Remove the unreachable error path.
https://developer-old.gnome.org/glib/stable/glib-Memory-Allocation.html#glib-Memory-Allocation.description
Reported-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230624174121.11508-13-philmd@linaro.org>
---
target/i386/whpx/whpx-all.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c
index 7fc8d4ffe5..63be5fbdad 100644
--- a/target/i386/whpx/whpx-all.c
+++ b/target/i386/whpx/whpx-all.c
@@ -2179,12 +2179,6 @@ int whpx_init_vcpu(CPUState *cpu)
vcpu = g_new0(struct whpx_vcpu, 1);
- if (!vcpu) {
- error_report("WHPX: Failed to allocte VCPU context.");
- ret = -ENOMEM;
- goto error;
- }
-
hr = whp_dispatch.WHvEmulatorCreateEmulator(
&whpx_emu_callbacks,
&vcpu->emulator);
--
2.38.1
- [PULL 04/30] accel: Document generic accelerator headers, (continued)
- [PULL 04/30] accel: Document generic accelerator headers, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 05/30] accel: Remove unused hThread variable on TCG/WHPX, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 06/30] accel: Fix a leak on Windows HAX, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 07/30] accel: Destroy HAX vCPU threads once done, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 08/30] accel: Rename 'hax_vcpu' as 'accel' in CPUState, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 09/30] accel: Rename HAX 'struct hax_vcpu_state' -> AccelCPUState, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 10/30] accel: Move HAX hThread to accelerator context, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 11/30] accel: Remove NVMM unreachable error path, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 12/30] accel: Rename NVMM 'struct qemu_vcpu' -> AccelCPUState, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 13/30] accel: Inline NVMM get_qemu_vcpu(), Philippe Mathieu-Daudé, 2023/06/28
- [PULL 14/30] accel: Remove WHPX unreachable error path,
Philippe Mathieu-Daudé <=
- [PULL 15/30] accel: Rename WHPX 'struct whpx_vcpu' -> AccelCPUState, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 17/30] accel: Rename 'cpu_state' -> 'cs', Philippe Mathieu-Daudé, 2023/06/28
- [PULL 16/30] accel: Inline WHPX get_whpx_vcpu(), Philippe Mathieu-Daudé, 2023/06/28
- [PULL 19/30] accel/kvm: Re-include "exec/memattrs.h" header, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 18/30] accel: Rename HVF 'struct hvf_vcpu_state' -> AccelCPUState, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 21/30] hw/intc/arm_gic: Un-inline GIC*/ITS class_name() helpers, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 28/30] exec/memory: Add symbolic value for memory listener priority for accel, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 20/30] accel/kvm: Declare kvm_direct_msi_allowed in stubs, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 24/30] target/arm: Restrict KVM-specific fields from ArchCPU, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 25/30] target/ppc: Restrict KVM-specific fields from ArchCPU, Philippe Mathieu-Daudé, 2023/06/28