commit | 8c12c76df2373b61764c2cacb4a6c505f874fa5f | [log] [tgz] |
---|---|---|
author | Philippe Mathieu-Daudé <philmd@linaro.org> | Wed Apr 05 10:04:07 2023 +0200 |
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | Wed Jun 28 13:55:35 2023 +0200 |
tree | 2b1b06e62fdfebc6962e08d58ab49e33a797c980 | |
parent | 642ce52d8ea9e1f80aa6013ad55bb66e51f1c76e [diff] |
accel: Remove NVMM unreachable error path g_malloc0() can not fail. Remove the unreachable error path. https://developer-old.gnome.org/glib/stable/glib-Memory-Allocation.html#glib-Memory-Allocation.description Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230624174121.11508-10-philmd@linaro.org>
diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index b3c3adc..90e9e0a 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nvmm-all.c
@@ -943,10 +943,6 @@ } qcpu = g_malloc0(sizeof(*qcpu)); - if (qcpu == NULL) { - error_report("NVMM: Failed to allocate VCPU context."); - return -ENOMEM; - } ret = nvmm_vcpu_create(mach, cpu->cpu_index, &qcpu->vcpu); if (ret == -1) {