1
linux/drivers/soc/xilinx
Jay Buddhabhatti 9b003e1480 drivers: soc: xilinx: check return status of get_api_version()
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>
2024-06-03 13:07:57 +02:00
..
Kconfig pmdomain: xilinx: Move Kconfig option to the pmdomain subsystem 2023-10-04 23:41:56 +02:00
Makefile
xlnx_event_manager.c firmware: xilinx: Move FIRMWARE_VERSION_MASK to xlnx-zynqmp.h 2024-06-03 13:07:56 +02:00
zynqmp_power.c drivers: soc: xilinx: check return status of get_api_version() 2024-06-03 13:07:57 +02:00