diff options
| author | Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> | 2026-09-09 14:37:07 +0200 |
|---|---|---|
| committer | Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> | 2026-09-14 09:26:29 +0200 |
| commit | 5f90f85eae4e9d2e9628b2019870994ba830b533 (patch) | |
| tree | ef94ccccf96be3cf1efe68c9f4bc47478567ea80 | |
| parent | 3b54dbd119805361695cb50ca6a875f4c7518b74 (diff) | |
| download | linux-5f90f85eae4e9d2e9628b2019870994ba830b533.tar.gz linux-5f90f85eae4e9d2e9628b2019870994ba830b533.zip | |
power: sequencing: don't call .post_enable() if pwrseq_unit_enable() failed
If the call to pwrseq_unit_enable() failed in pwrseq_enable(), bail out
instead of calling target->post_enable() which assumes the target was
successfully enabled.
Fixes: 249ebf3f65f8 ("power: sequencing: implement the pwrseq core")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260909-pwrseq-kunit-v2-1-ef496afc89d2@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
| -rw-r--r-- | drivers/power/sequencing/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/power/sequencing/core.c b/drivers/power/sequencing/core.c index 721e888b658d..76c39600f690 100644 --- a/drivers/power/sequencing/core.c +++ b/drivers/power/sequencing/core.c @@ -912,6 +912,8 @@ int pwrseq_enable(struct pwrseq_desc *desc) if (!ret) desc->powered_on = true; } + if (ret) + return ret; if (target->post_enable) { ret = target->post_enable(pwrseq); |
