From: Yangtao Li Date: Sat, 16 Feb 2019 16:15:01 +0000 (-0500) Subject: cpufreq: speedstep: convert BUG() to BUG_ON() X-Git-Tag: v5.1-rc1~151^2~1^2~1^2~5^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d6c8e086e9d98a591a6b515078cb0e05fb538b5c;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Viresh Kumar --- diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c index fbbcb88db0616..5d8a09b82efbd 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;