cpufreq: brcmstb-avs-cpufreq: ISO C90 forbids mixed declarations
authorPortia Stephens <portia.stephens@canonical.com>
Wed, 24 Apr 2024 05:02:20 +0000 (15:02 +1000)
committerViresh Kumar <viresh.kumar@linaro.org>
Thu, 25 Apr 2024 05:06:40 +0000 (10:36 +0530)
commitfa7bd98f3c8b33fb68c6b2bc69cff32b63db69f8
tree27d8866b67a18e80498ac7a9bc137e3b556a9715
parent39eaf5212441b7330e6e5fe50e3a0e7f8470b4ab
cpufreq: brcmstb-avs-cpufreq: ISO C90 forbids mixed declarations

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: f661017e6d32 ("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>
drivers/cpufreq/brcmstb-avs-cpufreq.c