aren't available, so we have to continue to check its existence on each
kstat read.
ok dlg@
-/* $OpenBSD: cpu.c,v 1.100 2023/11/23 01:00:44 dlg Exp $ */
+/* $OpenBSD: cpu.c,v 1.101 2023/11/23 19:54:30 patrick Exp $ */
/*
* Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
struct cpu_opp_kstats *coppk = ks->ks_data;
struct opp_table *ot = ci->ci_opp_table;
- struct cpu_info *oci = ot->ot_master;
+ struct cpu_info *oci;
struct timespec now, diff;
/* rate limit */
if (diff.tv_sec < 1)
return (0);
+ if (ot == NULL)
+ return (0);
+
+ oci = ot->ot_master;
if (oci == NULL)
oci = ci;