]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
bus: qcom-ssc-block-bus: Fix the error handling path of qcom_ssc_block_bus_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 2 Mar 2025 16:21:35 +0000 (17:21 +0100)
committerBjorn Andersson <andersson@kernel.org>
Thu, 13 Mar 2025 22:11:56 +0000 (17:11 -0500)
commitf41658cd081ad7697796b3dacd9a717a57919268
tree8dedb1d2b5c20d1e4c9e94db3c3f788dc6666fce
parenta9ac4ba7dcace2b3b91e7b87bf0ba97c47edd94f
bus: qcom-ssc-block-bus: Fix the error handling path of qcom_ssc_block_bus_probe()

If qcom_ssc_block_bus_pds_enable() fails, the previous call to
qcom_ssc_block_bus_pds_attach() must be undone, as already done in the
remove function.

In order to do that, move the code related to the power domains management
to the end of the function, in order to avoid many changes in all the error
handling path that would need to go through the new error handling path.

Fixes: 97d485edc1d9 ("bus: add driver for initializing the SSC bus on (some) qcom SoCs")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/1b89ec7438c9a893c09083e8591772c8ad3cb599.1740932040.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/bus/qcom-ssc-block-bus.c