cpufreq: speedstep: convert BUG() to BUG_ON()
authorYangtao Li <tiny.windzz@gmail.com>
Sat, 16 Feb 2019 16:15:01 +0000 (11:15 -0500)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 18 Feb 2019 04:57:38 +0000 (10:27 +0530)
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>
drivers/cpufreq/speedstep-ich.c

index fbbcb88db061652a35a573538e8cd51fabe6fa6b..5d8a09b82efbd338557d209c7e5a52effce83de7 100644 (file)
@@ -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;