summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/speedstep-ich.c
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2019-02-16 11:15:01 -0500
committerViresh Kumar <viresh.kumar@linaro.org>2019-02-18 10:27:38 +0530
commitd6c8e086e9d98a591a6b515078cb0e05fb538b5c (patch)
treeb13e357ce2fa0f15baa2406f640150a11c04939d /drivers/cpufreq/speedstep-ich.c
parent5ae06c237fd05a1e9acf6f35891cfd85de792521 (diff)
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.c3
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;