From nobody Wed Oct 29 17:16:07 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1525459172385380.779948937443; Fri, 4 May 2018 11:39:32 -0700 (PDT) Received: from localhost ([::1]:36026 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEfcB-0006Zk-KK for importer@patchew.org; Fri, 04 May 2018 14:39:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEfah-0005iV-6b for qemu-devel@nongnu.org; Fri, 04 May 2018 14:38:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fEfag-0000JS-Ay for qemu-devel@nongnu.org; Fri, 04 May 2018 14:37:59 -0400 Received: from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]:40406) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fEfaf-0000Ik-Up; Fri, 04 May 2018 14:37:58 -0400 Received: by mail-qt0-x244.google.com with SMTP id h2-v6so28626152qtp.7; Fri, 04 May 2018 11:37:57 -0700 (PDT) Received: by 10.200.5.77 with HTTP; Fri, 4 May 2018 11:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=iUuyLVfhV9Qes7ErBX5G74pzBEl52hOx2UARLAWfhWE=; b=s9gdXe8GMGX9xR0RTozIHUutxb7lL51XxOSEKwHJpy2Muga3BZcjZZEj8iuKMhRYbI Oo/VxoA2QnPiQw1WQA9qWhgSdwJTKvul98uoVprsWLpK1h13AqqeX8F1bVjSWR7GWjwZ vAmskc5z+oEYsYwlR92/1FAFjfFV6agL+VfWkKuDD9+WdD1j4IhA5UOz1KYO+LKqVmNV 0fH9pf66BdEjdPltb89Vtg8dNsZHbYpLfDElK3+8nhVIPoGfrmY9NA2LT8MV1qyFrZb0 xRhopm0KWUnxQFur6Gtaccun/AbNjZmhV2j3pUaUqFWDxFsPoTvtbg5J+4j1KHiXshkD XWpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=iUuyLVfhV9Qes7ErBX5G74pzBEl52hOx2UARLAWfhWE=; b=UWylODYtPVog8bAY1cNJNoHD7MatTGvHOav9brSF8dzpjSsj4YeI+2Z2xcJYfUQy79 rFhcVWcVSUVVZ8AXnGnxl1Vd9LZneHQ1hMkT+xkSbhqhVAYtC0z7xR+HzwZw6THqEmPV ck1cruYLIsCmZQ9EFvIPF2lY0Z12sHxvt8FwASKST3MTX49qQRcviKAnYIomK8aA4zTw JHn9O2DQaD6i1LLfOT3BbAh7Jnwkp+DT5b4W/wyHZwwXAYHwOTHkeIEdDVEtetWlHdAs aAHX4B90DsfLdAM/+agAFJ109u37s/L0z10y+EYyGp9e8aS3+T50uHoJNjuxaFRrzUWa eMZA== X-Gm-Message-State: ALQs6tBDtD6eltv3YoHPsMAfpVLErpZ+c3l6ShYVIN6afAHJmA9UyPMT YyPSwij+ysNknVHoPny6b1kOiXiAfYBl7xb8OqI= X-Google-Smtp-Source: AB8JxZoouXTZ8KDxh9wgG2feE/hm5Up0z0s0TupZE72UyFSI+vN4npwoU06z6XjRhGyQGcWQrL6joFMAbrqcMhRAMoU= X-Received: by 2002:ac8:41e:: with SMTP id v30-v6mr26215042qtg.270.1525459077157; Fri, 04 May 2018 11:37:57 -0700 (PDT) MIME-Version: 1.0 From: Jonathan Marler Date: Fri, 4 May 2018 12:37:56 -0600 Message-ID: To: crosthwaite.peter@gmail.com, agraf@suse.de, qemu-devel@nongnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::244 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: [Qemu-devel] [PATCH] handle all fdt_get_phandle_errors X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathan Marler Reviewed-by: Stefan Hajnoczi --- device_tree.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/device_tree.c b/device_tree.c index 52c3358..2b75905 100644 --- a/device_tree.c +++ b/device_tree.c @@ -379,8 +379,12 @@ uint32_t qemu_fdt_get_phandle(void *fdt, const char *path) r =3D fdt_get_phandle(fdt, findnode_nofail(fdt, path)); if (r =3D=3D 0) { - error_report("%s: Couldn't get phandle for %s: %s", __func__, - path, fdt_strerror(r)); + error_report("%s: Node %s does not have a 'phandle'", __func__, + path); + exit(1); + } + if (r =3D=3D -1) { + error_report("%s: Couldn't get phandle for %s", __func__, path); exit(1); } --=20 2.1.4