linux-stable/drivers/firmware
Ludvig Pärsson 44dbdf3bb3 firmware: arm_scmi: Fix incorrect error propagation in scmi_voltage_descriptors_get
scmi_voltage_descriptors_get() will incorrecly return an error code if
the last iteration of the for loop that retrieves the descriptors is
skipped due to an error. Skipping an iteration in the loop is not an
error, but the `ret` value from the last iteration will be propagated
when the function returns.

Fix by not saving return values that should not be propagated. This
solution also minimizes the risk of future patches accidentally
re-introducing this bug.

Link: https://lore.kernel.org/r/20220610140055.31491-1-ludvig.parsson@axis.com
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Ludvig Pärsson <ludvig.parsson@axis.com>
[sudeep.holla: Removed unneeded reset_rx_to_maxsz and check for return
value from scmi_voltage_levels_get as suggested by Cristian]
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2022-06-12 19:59:55 +01:00
..
arm_ffa firmware: arm_ffa: Remove incorrect assignment of driver_data 2022-04-29 14:51:46 +01:00
arm_scmi firmware: arm_scmi: Fix incorrect error propagation in scmi_voltage_descriptors_get 2022-06-12 19:59:55 +01:00
broadcom firmware: tee_bnxt: Use UUID API for exporting the UUID 2022-05-05 18:14:29 -07:00
cirrus firmware: cs_dsp: Fix overrun of unterminated control name string 2022-04-12 17:57:04 +01:00
efi Follow-up tweaks for the EFI changes in v5.19 2022-06-03 13:39:30 -07:00
google firmware: google: Properly state IOMEM dependency 2022-03-18 14:18:15 +01:00
imx firmware: imx: scu-pd: imx8q: add vpu mu resources 2022-02-20 14:55:32 +08:00
meson
psci
smccc printk: stop including cache.h from printk.h 2022-05-13 07:20:07 -07:00
tegra
xilinx firmware: xilinx: enable feature check for ZynqMP 2022-04-22 17:20:03 +02:00
Kconfig sound updates for 5.19-rc1 2022-05-25 16:55:16 -07:00
Makefile Follow-up tweaks for the EFI changes in v5.19 2022-06-03 13:39:30 -07:00
arm_scpi.c
arm_sdei.c ACPI: APEI: explicit init of HEST and GHES in apci_init() 2022-03-03 20:24:22 +01:00
dmi-id.c
dmi-sysfs.c firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle 2022-05-19 18:56:56 +02:00
dmi_scan.c
edd.c edd: simplify the check of 'attr->test' in edd_populate_dir() 2022-05-19 18:57:04 +02:00
iscsi_ibft.c
iscsi_ibft_find.c
memmap.c
mtk-adsp-ipc.c firmware: mediatek: Add adsp ipc protocol interface 2022-05-16 12:58:11 +01:00
pcdp.c
pcdp.h
qcom_scm-legacy.c
qcom_scm-smc.c
qcom_scm.c firmware: qcom_scm: Add compatible for MSM8976 SoC 2022-04-12 21:36:19 -05:00
qcom_scm.h firmware: qcom: scm: Add support for MC boot address API 2022-02-03 21:54:48 -06:00
qemu_fw_cfg.c
raspberrypi.c
scpi_pm_domain.c
stratix10-rsu.c
stratix10-svc.c firmware: stratix10-svc: fix a missing check on list iterator 2022-04-24 17:31:20 +02:00
sysfb.c
sysfb_simplefb.c Char/Misc and other driver updates for 5.18-rc1 2022-03-28 12:27:35 -07:00
ti_sci.c firmware: ti_sci: Switch transport to polled mode during system suspend 2022-05-03 06:52:11 -05:00
ti_sci.h
trusted_foundations.c
turris-mox-rwtm.c