linux-stable/drivers/firmware
Gabor Juhos 130b4b9478 firmware: qcom_scm: disable clocks if qcom_scm_bw_enable() fails
[ Upstream commit 0c50b7fcf2 ]

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: 65b7ebda50 ("firmware: qcom_scm: Add bw voting support to the SCM interface")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/20240304-qcom-scm-disable-clk-v1-1-b36e51577ca1@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-21 14:38:21 +02:00
..
arm_ffa firmware: arm_ffa: Allow the FF-A drivers to use 32bit mode of messaging 2023-11-20 11:59:16 +01:00
arm_scmi firmware: arm_scmi: Make raw debugfs entries non-seekable 2024-04-17 11:19:27 +02:00
broadcom
cirrus firmware: cirrus: cs_dsp: Only log list of algorithms in debug build 2023-09-13 18:50:32 +01:00
efi efi: libstub: only free priv.runtime_map when allocated 2024-06-12 11:13:01 +02:00
google
imx firmware/imx-dsp: Fix use_after_free in imx_dsp_setup_channels() 2023-10-10 10:30:29 +08:00
meson
psci
smccc
tegra firmware: tegra: bpmp: Return directly after a failed kzalloc() in get_filename() 2024-04-13 13:07:31 +02:00
xilinx Pin control bulk changes for the v6.6 kernel cycle: 2023-08-30 19:36:19 -07:00
arm_scpi.c
arm_sdei.c
dmi-id.c firmware: dmi-id: add a release callback function 2024-06-12 11:12:15 +02:00
dmi-sysfs.c
dmi_scan.c
edd.c
iscsi_ibft.c
iscsi_ibft_find.c
Kconfig
Makefile
memmap.c
mtk-adsp-ipc.c
pcdp.c
pcdp.h
qcom_scm-legacy.c
qcom_scm-smc.c
qcom_scm.c firmware: qcom_scm: disable clocks if qcom_scm_bw_enable() fails 2024-06-21 14:38:21 +02:00
qcom_scm.h
qemu_fw_cfg.c
raspberrypi.c firmware: raspberrypi: Use correct device for DMA mappings 2024-06-12 11:11:31 +02:00
scpi_pm_domain.c
stratix10-rsu.c Char/Misc driver changes for 6.6-rc1 2023-09-01 09:53:54 -07:00
stratix10-svc.c
sysfb.c Revert "drivers/firmware: Move sysfb_init() from device_initcall to subsys_initcall_sync" 2024-01-31 16:19:07 -08:00
sysfb_simplefb.c
ti_sci.c firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create() 2024-01-25 15:35:20 -08:00
ti_sci.h
trusted_foundations.c
turris-mox-rwtm.c