diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-02-16 17:15:01 +0100 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2019-02-18 05:57:38 +0100 |
commit | d6c8e086e9d98a591a6b515078cb0e05fb538b5c (patch) | |
tree | b13e357ce2fa0f15baa2406f640150a11c04939d /drivers/cpufreq | |
parent | cpufreq: powernv: fix missing check of return value in init_powernv_pstates() (diff) | |
download | linux-d6c8e086e9d98a591a6b515078cb0e05fb538b5c.tar.xz linux-d6c8e086e9d98a591a6b515078cb0e05fb538b5c.zip |
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')
-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; |