OpenCloudOS-Kernel/drivers/firmware/arm_scmi
Anders Roxell b5e817dcdd firmware: arm_scmi: prevent accessing rate_discrete uninitialized
gcc-5.3 and earlier warns that rate_discrete maybe-uninitialized
    ../drivers/firmware/arm_scmi/clock.c:185:5: warning: 'rate_discrete'
        may be used uninitialized in this function [-Wmaybe-uninitialized]
      if (rate_discrete)
         ^
    ../drivers/firmware/arm_scmi/clock.c:128:7: note:
        'rate_discrete' was declared here
      bool rate_discrete;
           ^
This patch fixing the warning by initialising rate_discrete and also using
goto label for the error path.

Fixes: 5f6c6430e9 ("firmware: arm_scmi: add initial support for clock protocol")
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
[sudeep.holla: added one line description to the commit message]
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2018-03-20 12:20:27 +00:00
..
Makefile firmware: arm_scmi: add device power domain support using genpd 2018-02-28 16:37:57 +00:00
base.c firmware: arm_scmi: add common infrastructure and support for base protocol 2018-02-28 16:37:57 +00:00
bus.c firmware: arm_scmi: add scmi protocol bus to enumerate protocol devices 2018-02-28 16:37:57 +00:00
clock.c firmware: arm_scmi: prevent accessing rate_discrete uninitialized 2018-03-20 12:20:27 +00:00
common.h firmware: arm_scmi: add initial support for performance protocol 2018-02-28 16:37:57 +00:00
driver.c firmware: arm_scmi: add per-protocol channels support using idr objects 2018-02-28 16:37:57 +00:00
perf.c firmware: arm_scmi: add option for polling based performance domain operations 2018-02-28 16:37:57 +00:00
power.c firmware: arm_scmi: add initial support for power protocol 2018-02-28 16:37:57 +00:00
scmi_pm_domain.c firmware: arm_scmi: add device power domain support using genpd 2018-02-28 16:37:57 +00:00
sensors.c firmware: arm_scmi: add initial support for sensor protocol 2018-02-28 16:37:57 +00:00