mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-12 04:15:21 +02:00
cpufreq: brcmstb-avs-cpufreq: ISO C90 forbids mixed declarations
[ Upstream commitfa7bd98f3c
] There is a compile warning because a NULL pointer check was added before a struct was declared. This moves the NULL pointer check to after the struct is declared and moves the struct assignment to after the NULL pointer check. Fixes:f661017e6d
("cpufreq: brcmstb-avs-cpufreq: add check for cpufreq_cpu_get's return value") Signed-off-by: Portia Stephens <portia.stephens@canonical.com> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e1dcff6e29
commit
abd2e71185
|
@ -481,9 +481,12 @@ static bool brcm_avs_is_firmware_loaded(struct private_data *priv)
|
||||||
static unsigned int brcm_avs_cpufreq_get(unsigned int cpu)
|
static unsigned int brcm_avs_cpufreq_get(unsigned int cpu)
|
||||||
{
|
{
|
||||||
struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
|
struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
|
||||||
|
struct private_data *priv;
|
||||||
|
|
||||||
if (!policy)
|
if (!policy)
|
||||||
return 0;
|
return 0;
|
||||||
struct private_data *priv = policy->driver_data;
|
|
||||||
|
priv = policy->driver_data;
|
||||||
|
|
||||||
cpufreq_cpu_put(policy);
|
cpufreq_cpu_put(policy);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user