]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PM / Domains: Allow no domain-idle-states DT property in genpd when parsing
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 10 Mar 2020 10:40:23 +0000 (11:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 14:12:04 +0000 (16:12 +0200)
commita0fc9775e8481e753a9e12b78722e8eaddca8f17
tree3f883b93841ee066276c1d2843b39398fae3d327
parent9351d87b51e5b9e7117963978be5df0a417fa185
PM / Domains: Allow no domain-idle-states DT property in genpd when parsing

commit 56cb26891ea4180121265dc6b596015772c4a4b8 upstream.

Commit 2c361684803e ("PM / Domains: Don't treat zero found compatible idle
states as an error"), moved of_genpd_parse_idle_states() towards allowing
none compatible idle state to be found for the device node, rather than
returning an error code.

However, it didn't consider that the "domain-idle-states" DT property may
be missing as it's optional, which makes of_count_phandle_with_args() to
return -ENOENT. Let's fix this to make the behaviour consistent.

Fixes: 2c361684803e ("PM / Domains: Don't treat zero found compatible idle states as an error")
Reported-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Cc: 4.20+ <stable@vger.kernel.org> # 4.20+
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/power/domain.c