From nobody Thu Jan 20 10:06:14 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 80FEE1961BAC; Thu, 20 Jan 2022 10:06:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JfdSm22STz4SsX; Thu, 20 Jan 2022 10:06:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642673176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UV38pwH8Gn6b+vXN+rEQyd9GP2vR4emYE12XgF5cymg=; b=sDnICjM0CMHuMfMIUltlsG7CN6BsRdvTZTrGZ/V4Ibu5nXvdb2hzwBt0t5xAbgsNaSZbD9 1YIar3wkd+70wQa8IaWHoi1HEA02jC5wTxzVZkOrjFDgWg0qxOUUC3W065DWodse2bSJQf 6zocDmgTX2yvW1QgR3kXKdGiS1qrI0eK9vfrk4jPeyfwTuVNO2OQFB6YYZZXrLwx9ANa4Q 1Odk8oWVKTF+6f0DLHhsUIEtja4zFjssZRd0Da1QYZxwR0YG6umsIsnNJ1hiTpmzM6DKmB uEYUpNwub8D+zKBzjK6QGzX8CUKgv/Deh/lsHx4lbSzCHcJfskWgSLtKPvmYkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADD882625B; Thu, 20 Jan 2022 10:06:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20KA6EWb090867; Thu, 20 Jan 2022 10:06:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20KA6EQY090866; Thu, 20 Jan 2022 10:06:14 GMT (envelope-from git) Date: Thu, 20 Jan 2022 10:06:14 GMT Message-Id: <202201201006.20KA6EQY090866@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michal Meloun Subject: git: 57dd17dd60e7 - stable/13 - Fix error value returned by ofw_bus_gen_get_node(). List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 57dd17dd60e7bb618ab2979df2d580559fcf3729 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642673177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UV38pwH8Gn6b+vXN+rEQyd9GP2vR4emYE12XgF5cymg=; b=R/w7icS5mxXwxi943KdOXNeDi1dUcc8LnBo2hKLK0lgI21w0o5MM8i5DpJnVXbC/Uc+U6m Wq0wzvKgh7xQJRbGzHhhm/KAyeFuQ89rBAVYpCE2HkriQqBrd+W22AZpQg7lvWH10ps4rP 7sw7/Z9jisrOZ1QcMyAljmjzzE0fA7sNP0fcGwOYN3UO+rETzjYYVtftCpAttje+EAZ3Iv c/Nc6rivkGmaDyp4JF3zCBb5rl3/vbD4+Zdj6kEfjVt2v0DjJdkhcmL5TtsmhlbZFHyP9o Hkzd4TY06yWiPbuoXRoe3f6WIdyLkvYWtWpR8bEmMPp6UE4LXCEMpkCi64LoGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642673177; a=rsa-sha256; cv=none; b=BDubdu6iV/09rI8SbczlCjZTyEF1tv8y7ap6uwsDi5xZj/nUHoMHyyocOTMQwRg8U3nK4A KdCl8Z9HuHZDDJ3z7OqVM8EegUl4QGRj9SoCNkcfkm7QtbGmKa8vRyoCUEzIq2efzLVeGm wAv4qdKkO5FPmENmFejsWkCoHd0dbzEuxeN1VWuzqT/rhsbxpq1FlizdBDqu8dZLqHAlwU jC6xF5bU8UPxYWKcUFrYVrAQptVOOTKGWe357LfZzJAryaP9mvuTPDB9tWXfUvj6p1Zmt6 DMHoJJSNYT26zdwiQfNSlmLdn+v+WtugPuQd6RyBAazYemF1yPa/LjGL7lp42g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=57dd17dd60e7bb618ab2979df2d580559fcf3729 commit 57dd17dd60e7bb618ab2979df2d580559fcf3729 Author: Michal Meloun AuthorDate: 2021-06-24 09:56:20 +0000 Commit: Michal Meloun CommitDate: 2022-01-20 10:00:55 +0000 Fix error value returned by ofw_bus_gen_get_node(). By definition ofw_bus_get_node() should consistently return -1 when there is no associated OF node. MFC after: 4 weeks Discussed with: nwhitehorn Analyzed in: https://reviews.freebsd.org/D30761 (cherry picked from commit 3eae4e106ac7222364fc9dc8c3d35d4ad8c5293a) --- sys/dev/ofw/ofw_bus_subr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ofw/ofw_bus_subr.c b/sys/dev/ofw/ofw_bus_subr.c index 5ce8d7b7bd48..a630e4333fd9 100644 --- a/sys/dev/ofw/ofw_bus_subr.c +++ b/sys/dev/ofw/ofw_bus_subr.c @@ -147,7 +147,7 @@ ofw_bus_gen_get_node(device_t bus, device_t dev) obd = OFW_BUS_GET_DEVINFO(bus, dev); if (obd == NULL) - return (0); + return ((phandle_t)-1); return (obd->obd_node); }