cpuidle: dt: Return the correct numbers of parsed idle states
stable inclusion from stable-v4.19.270 commit fff6b31b49d7d33151b401c9df4bbbecbe13cc72 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6DPF8 CVE: NA -------------------------------- [ Upstream commit ee3c2c8a ] While we correctly skips to initialize an idle state from a disabled idle state node in DT, the returned value from dt_init_idle_driver() don't get adjusted accordingly. Instead the number of found idle state nodes are returned, while the callers are expecting the number of successfully initialized idle states from DT. This leads to cpuidle drivers unnecessarily continues to initialize their idle state specific data. Moreover, in the case when all idle states have been disabled in DT, we would end up registering a cpuidle driver, rather than relying on the default arch specific idle call. Fixes: 9f14da34 ("drivers: cpuidle: implement DT based idle states infrastructure") Signed-off-by:Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by:
Sudeep Holla <sudeep.holla@arm.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Yongqiang Liu <liuyongqiang13@huawei.com>
Loading
Please sign in to comment