diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-02-16 19:15:01 +0300 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2019-02-18 07:57:38 +0300 |
commit | d6c8e086e9d98a591a6b515078cb0e05fb538b5c (patch) | |
tree | b13e357ce2fa0f15baa2406f640150a11c04939d /drivers/cpufreq/speedstep-ich.c | |
parent | 5ae06c237fd05a1e9acf6f35891cfd85de792521 (diff) | |
download | linux-d6c8e086e9d98a591a6b515078cb0e05fb538b5c.tar.xz |
cpufreq: speedstep: convert BUG() to BUG_ON()
To fix coccinelle WARNING.
WARNING: Use BUG_ON instead of if condition followed by BUG.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/speedstep-ich.c')
-rw-r--r-- | drivers/cpufreq/speedstep-ich.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c index fbbcb88db061..5d8a09b82efb 100644 --- a/drivers/cpufreq/speedstep-ich.c +++ b/drivers/cpufreq/speedstep-ich.c @@ -243,8 +243,7 @@ static unsigned int speedstep_get(unsigned int cpu) unsigned int speed; /* You're supposed to ensure CPU is online. */ - if (smp_call_function_single(cpu, get_freq_data, &speed, 1) != 0) - BUG(); + BUG_ON(smp_call_function_single(cpu, get_freq_data, &speed, 1)); pr_debug("detected %u kHz as current frequency\n", speed); return speed; |