mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
ANDROID: cpufreq: brcmstb-avs-cpufreq: fix build error
In commitd951cf510f("cpufreq: brcmstb-avs-cpufreq: add check for cpufreq_cpu_get's return value"), a check is made in a way that causes a build warning, which in Android systems, breaks the build. Fix this up by moving the definition of the variable above the check to remove the warning. Fixes:d951cf510f("cpufreq: brcmstb-avs-cpufreq: add check for cpufreq_cpu_get's return value") Change-Id: I8477905e3447eb4eabf3aa0899534c06a0cca125 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -481,9 +481,11 @@ static bool brcm_avs_is_firmware_loaded(struct private_data *priv)
|
||||
static unsigned int brcm_avs_cpufreq_get(unsigned int cpu)
|
||||
{
|
||||
struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
|
||||
struct private_data *priv;
|
||||
|
||||
if (!policy)
|
||||
return 0;
|
||||
struct private_data *priv = policy->driver_data;
|
||||
priv = policy->driver_data;
|
||||
|
||||
cpufreq_cpu_put(policy);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user