From 074353b3b9e18f1378314a10e0579eb957fb5c92 Mon Sep 17 00:00:00 2001 From: patrick Date: Wed, 26 Apr 2023 21:37:46 +0000 Subject: [PATCH] Fix phy_enable_prop_idx() to retrieve the property length with the passed property name instead of "phys". ok dlg@ --- sys/dev/ofw/ofw_misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ofw/ofw_misc.c b/sys/dev/ofw/ofw_misc.c index 9bfa7979a38..3bcb6f3b013 100644 --- a/sys/dev/ofw/ofw_misc.c +++ b/sys/dev/ofw/ofw_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofw_misc.c,v 1.41 2023/04/03 01:40:32 dlg Exp $ */ +/* $OpenBSD: ofw_misc.c,v 1.42 2023/04/26 21:37:46 patrick Exp $ */ /* * Copyright (c) 2017-2021 Mark Kettenis * @@ -257,7 +257,7 @@ phy_enable_prop_idx(int node, char *prop, int idx) int rv = -1; int len; - len = OF_getproplen(node, "phys"); + len = OF_getproplen(node, prop); if (len <= 0) return -1; -- 2.20.1