From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YflOT-00013H-H5 for qemu-devel@nongnu.org; Wed, 08 Apr 2015 04:31:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YflOQ-0005tw-2N for qemu-devel@nongnu.org; Wed, 08 Apr 2015 04:31:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YflOP-0005tq-MG for qemu-devel@nongnu.org; Wed, 08 Apr 2015 04:31:25 -0400 Message-ID: <5524E757.6040008@redhat.com> Date: Wed, 08 Apr 2015 10:31:19 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1428439603-8549-1-git-send-email-ehabkost@redhat.com> <1428439603-8549-2-git-send-email-ehabkost@redhat.com> In-Reply-To: <1428439603-8549-2-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/6] target-i386: Move error handling to end of x86_cpu_parse_featurestr() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , qemu-devel@nongnu.org Cc: Igor Mammedov , Jiri Denemark , =?windows-1252?Q?Andreas_F=E4rber?= On 07/04/2015 22:46, Eduardo Habkost wrote: > Signed-off-by: Eduardo Habkost > --- > target-i386/cpu.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index 03b33cf..f83d586 100644 > --- a/target-i386/cpu.c > +++ b/target-i386/cpu.c > @@ -1961,8 +1961,7 @@ static void x86_cpu_parse_featurestr(CPUState *cs, char *features, > object_property_parse(OBJECT(cpu), "on", featurestr, &local_err); > } > if (local_err) { > - error_propagate(errp, local_err); > - return; > + goto out; > } > featurestr = strtok(NULL, ","); > } > @@ -1978,6 +1977,11 @@ static void x86_cpu_parse_featurestr(CPUState *cs, char *features, > env->features[w] |= plus_features[w]; > env->features[w] &= ~minus_features[w]; > } > + > +out: > + if (local_err) { > + error_propagate(errp, local_err); > + } > } > > /* Print all cpuid feature names in featureset > Reviewed-by: Paolo Bonzini