From nobody Sun May 19 06:50:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1586014480; cv=none; d=zohomail.com; s=zohoarc; b=Y5fDz78kCu5vBuhDNDuhgjQ8h6rQBOa+sP3t1BAVLcT/qxauURC9cTKZY7aOCliK6g/Lpq4exF6uMCC5ihy6JkOeBptBHg5k8v12W3LE/fDAvFXKPyIa+uaNfrXu9NycDJr8Sdms/yG8pwLMAUSVtoxMdXNOJLZm9h1hlbfiv5U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586014480; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Mf6B6VmxHGkdxtiEkxHWUrnJTm1cenyWsJDqxPQ+PQw=; b=PjdeAa7IvIsR5gV6uV65uoA2IzbAlVUMeXya8JQR+Fl+w1yarYww3JKUGs32G5R4A7/L9+2n/YCHhZvCJkI2aCXY5RkoiBZlZML9BnjZZ+AKW8IGvnTqjqz2SxgRMu6TEV7nzecrH1MZGb+if83TvSeZ1jDhjraZJOCvy0UDAsU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586014480808840.1029061730495; Sat, 4 Apr 2020 08:34:40 -0700 (PDT) Received: from localhost ([::1]:39612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKkoh-0004Hg-0w for importer@patchew.org; Sat, 04 Apr 2020 11:34:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46300) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKko6-0003rH-BJ for qemu-devel@nongnu.org; Sat, 04 Apr 2020 11:34:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKko5-0002p5-6L for qemu-devel@nongnu.org; Sat, 04 Apr 2020 11:34:02 -0400 Received: from 5.mo177.mail-out.ovh.net ([46.105.39.154]:52403) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jKko5-0002kv-0q for qemu-devel@nongnu.org; Sat, 04 Apr 2020 11:34:01 -0400 Received: from player716.ha.ovh.net (unknown [10.108.57.14]) by mo177.mail-out.ovh.net (Postfix) with ESMTP id 875DF12A117 for ; Sat, 4 Apr 2020 17:33:51 +0200 (CEST) Received: from kaod.org (82-64-250-170.subs.proxad.net [82.64.250.170]) (Authenticated sender: clg@kaod.org) by player716.ha.ovh.net (Postfix) with ESMTPSA id 28B77110B2C85; Sat, 4 Apr 2020 15:33:42 +0000 (UTC) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Peter Maydell Subject: [PATCH] qom/object: Fix object_child_foreach_recursive() return value Date: Sat, 4 Apr 2020 17:33:40 +0200 Message-Id: <20200404153340.164861-1-clg@kaod.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Ovh-Tracer-Id: 12168444720268086033 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrtdekgdeklecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofggtgfgsehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecukfhppedtrddtrddtrddtpdekvddrieegrddvhedtrddujedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepphhlrgihvghrjeduiedrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpegtlhhgsehkrghougdrohhrghdprhgtphhtthhopehqvghmuhdquggvvhgvlhesnhhonhhgnhhurdhorhhg Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.105.39.154 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Crosthwaite , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Eduardo Habkost , qemu-devel@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" When recursing, the return value of do_object_child_foreach() is not taken into account. Cc: Peter Crosthwaite Fixes: d714b8de7747 ("qom: Add recursive version of object_child_for_each") Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- qom/object.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qom/object.c b/qom/object.c index 1812f792247d..b68a707a5e65 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1057,7 +1057,10 @@ static int do_object_child_foreach(Object *obj, break; } if (recurse) { - do_object_child_foreach(child, fn, opaque, true); + ret =3D do_object_child_foreach(child, fn, opaque, true); + if (ret !=3D 0) { + break; + } } } } --=20 2.25.1