mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
perf: avoid div zero if up_perf_init() hasn't init
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
static unsigned long g_cpu_freq;
|
||||
static unsigned long g_cpu_freq = ULONG_MAX;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
static unsigned long g_cpu_freq;
|
||||
static unsigned long g_cpu_freq = ULONG_MAX;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
static unsigned long g_cpu_freq;
|
||||
static unsigned long g_cpu_freq = ULONG_MAX;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
static unsigned long g_cpu_freq;
|
||||
static unsigned long g_cpu_freq = ULONG_MAX;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
static unsigned long g_cpu_freq;
|
||||
static unsigned long g_cpu_freq = ULONG_MAX;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
|
||||
Reference in New Issue
Block a user