From 9834fe02b00552648d498ca561b51f8ff1d7df31 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 4 Feb 2015 11:26:04 +0100 Subject: [PATCH] kvm: g_malloc() can't fail, bury dead error handling Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Gonglei Signed-off-by: Michael Tokarev --- kvm-all.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 2f21a4e..05a79c2 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -2070,10 +2070,6 @@ int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr, } bp = g_malloc(sizeof(struct kvm_sw_breakpoint)); - if (!bp) { - return -ENOMEM; - } - bp->pc = addr; bp->use_count = 1; err = kvm_arch_insert_sw_breakpoint(cpu, bp); -- 2.7.4