Commit 0fce1c95 authored by Gabor Juhos's avatar Gabor Juhos Committed by Greg Kroah-Hartman
Browse files

firmware: qcom_scm: disable clocks if qcom_scm_bw_enable() fails



[ Upstream commit 0c50b7fc ]

There are several functions which are calling qcom_scm_bw_enable()
then returns immediately if the call fails and leaves the clocks
enabled.

Change the code of these functions to disable clocks when the
qcom_scm_bw_enable() call fails. This also fixes a possible dma
buffer leak in the qcom_scm_pas_init_image() function.

Compile tested only due to lack of hardware with interconnect
support.

Cc: stable@vger.kernel.org
Fixes: 65b7ebda ("firmware: qcom_scm: Add bw voting support to the SCM interface")
Signed-off-by: default avatarGabor Juhos <j4g8y7@gmail.com>
Reviewed-by: default avatarMukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/20240304-qcom-scm-disable-clk-v1-1-b36e51577ca1@gmail.com


Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 5ee241f7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment