diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-06-21 15:52:51 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-06-28 13:55:35 +0200 |
commit | 50830fea89ceefefd455d2489c4f8914df2d68ca (patch) | |
tree | b299bba34ca41e3eb68182ad69e635630f7906a3 | |
parent | 2f642b1c2cfa32a1d5af6cbe66c16b5d1c5fd69c (diff) | |
download | qemu-50830fea89ceefefd455d2489c4f8914df2d68ca.zip qemu-50830fea89ceefefd455d2489c4f8914df2d68ca.tar.gz qemu-50830fea89ceefefd455d2489c4f8914df2d68ca.tar.bz2 |
accel: Remove WHPX unreachable error path
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>
-rw-r--r-- | target/i386/whpx/whpx-all.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index 7fc8d4f..63be5fb 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); |