OpenCloudOS-Kernel/drivers/soc
Jay Buddhabhatti e44eb9d83d drivers: soc: xilinx: check return status of get_api_version()
commit 9b003e14801cf85a8cebeddc87bc9fc77100fdce upstream.

Currently return status is not getting checked for get_api_version
and because of that for x86 arch we are getting below smatch error.

    CC      drivers/soc/xilinx/zynqmp_power.o
drivers/soc/xilinx/zynqmp_power.c: In function 'zynqmp_pm_probe':
drivers/soc/xilinx/zynqmp_power.c:295:12: warning: 'pm_api_version' is
used uninitialized [-Wuninitialized]
    295 |         if (pm_api_version < ZYNQMP_PM_VERSION)
        |            ^
    CHECK   drivers/soc/xilinx/zynqmp_power.c
drivers/soc/xilinx/zynqmp_power.c:295 zynqmp_pm_probe() error:
uninitialized symbol 'pm_api_version'.

So, check return status of pm_get_api_version and return error in case
of failure to avoid checking uninitialized pm_api_version variable.

Fixes: b9b3a8be28 ("firmware: xilinx: Remove eemi ops for get_api_version")
Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240515112345.24673-1-jay.buddhabhatti@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-03 08:54:18 +02:00
..
actions genpd: move owl-sps-helper.c from drivers/soc 2023-07-26 14:41:01 +02:00
amlogic soc: amlogic: Explicitly include correct DT includes 2023-08-04 15:18:42 +02:00
apple soc: apple: Move power-domain driver to the genpd dir 2023-07-11 15:30:09 +02:00
aspeed ARM: SoC cleanups for 6.6 2023-08-30 16:49:40 -07:00
atmel soc: microchip: Explicitly include correct DT includes 2023-07-29 16:54:29 +03:00
bcm soc: bcm: Move power-domain drivers to the genpd dir 2023-07-11 15:30:09 +02:00
canaan
dove
fsl soc: fsl: qbman: Use raw spinlock for cgr_lock 2024-04-03 15:28:32 +02:00
fujitsu soc: fujitsu: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:50 -07:00
gemini
hisilicon soc: kunpeng_hccs: fix some sparse warnings about incorrect type 2023-08-21 21:05:11 -04:00
imx soc: imx8m: Enable OCOTP clock for imx8mm before reading registers 2023-09-24 20:50:27 +08:00
ixp4xx
lantiq
litex
loongson soc: loongson: loongson2_guts: Remove unneeded semicolon 2023-09-27 11:05:47 +02:00
mediatek soc: mediatek: cmdq: Fix typo of CMDQ_JUMP_RELATIVE 2024-06-12 11:11:34 +02:00
microchip soc: microchip: Fix POLARFIRE_SOC_SYS_CTRL input prompt 2024-03-26 18:19:11 -04:00
nuvoton
pxa
qcom soc: qcom: pdr: fix parsing of domains lists 2024-08-03 08:53:28 +02:00
renesas soc: renesas: ARCH_R9A07G043 depends on !RISCV_ISA_ZICBOM 2023-10-26 09:42:38 +02:00
rockchip ARM: SoC cleanups for 6.6 2023-08-30 16:49:40 -07:00
samsung Samsung SoC driver changes for v6.6 2023-08-12 12:09:43 +02:00
sifive
starfive soc: starfive: Move the power-domain driver to the genpd dir 2023-07-14 10:40:56 +02:00
sunxi - simplify code in sunxi-rsb 2023-08-12 12:07:58 +02:00
tegra soc/tegra: Changes for v6.6-rc1 2023-08-12 12:01:51 +02:00
ti soc: ti: wkup_m3_ipc: Send NULL dummy message instead of pointer message 2024-07-05 09:33:52 +02:00
ux500
versatile
xilinx drivers: soc: xilinx: check return status of get_api_version() 2024-08-03 08:54:18 +02:00
Kconfig soc: hisilicon: Support HCCS driver on Kunpeng SoC 2023-08-08 12:36:29 +00:00
Makefile HiSilicon driver updates for v6.6 2023-08-12 12:10:46 +02:00