clk: qcom: gdsc: Release pm subdomains in reverse add order
commit 0e6dfde439df0bb977cddd3cf7fff150a084a9bf upstream.
gdsc_unregister() should release subdomains in the reverse order to the
order in which those subdomains were added.
I've made this patch a standalone patch because it facilitates a subsequent
fix to stable.
Fixes: 1b771839de ("clk: qcom: gdsc: enable optional power domain support")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20250117-b4-linux-next-24-11-18-clock-multiple-power-domains-v10-1-13f2bb656dad@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
809e83a575
commit
12ef07c4bf
@@ -571,7 +571,7 @@ void gdsc_unregister(struct gdsc_desc *desc)
|
|||||||
size_t num = desc->num;
|
size_t num = desc->num;
|
||||||
|
|
||||||
/* Remove subdomains */
|
/* Remove subdomains */
|
||||||
for (i = 0; i < num; i++) {
|
for (i = num - 1; i >= 0; i--) {
|
||||||
if (!scs[i])
|
if (!scs[i])
|
||||||
continue;
|
continue;
|
||||||
if (scs[i]->parent)
|
if (scs[i]->parent)
|
||||||
|
|||||||
Reference in New Issue
Block a user