Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b5e817dc authored by Anders Roxell's avatar Anders Roxell Committed by Sudeep Holla
Browse files

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: 5f6c6430 ("firmware: arm_scmi: add initial support for clock protocol")
Suggested-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarAnders Roxell <anders.roxell@linaro.org>
[sudeep.holla: added one line description to the commit message]
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
parent c09880ce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment