Fix phy_enable_prop_idx() to retrieve the property length with the passed
authorpatrick <patrick@openbsd.org>
Wed, 26 Apr 2023 21:37:46 +0000 (21:37 +0000)
committerpatrick <patrick@openbsd.org>
Wed, 26 Apr 2023 21:37:46 +0000 (21:37 +0000)
property name instead of "phys".

ok dlg@

sys/dev/ofw/ofw_misc.c

index 9bfa797..3bcb6f3 100644 (file)
@@ -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;