Skip to content

Commit

Permalink
firmware: xilinx: check return value of zynqmp_pm_get_api_version()
Browse files Browse the repository at this point in the history
Currently return value of zynqmp_pm_get_api_version() is ignored.
Because of that, API version is checked in case of error also.
So add check for return value of zynqmp_pm_get_api_version().

Signed-off-by: Rajan Vaja <[email protected]>
Reviewed-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michal Simek <[email protected]>
  • Loading branch information
rajanv-xilinx authored and Michal Simek committed Dec 8, 2021
1 parent 628e8ba commit 168e05c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/firmware/xilinx/zynqmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,10 @@ static int zynqmp_firmware_probe(struct platform_device *pdev)
return ret;

/* Check PM API version number */
zynqmp_pm_get_api_version(&pm_api_version);
ret = zynqmp_pm_get_api_version(&pm_api_version);
if (ret)
return ret;

if (pm_api_version < ZYNQMP_PM_VERSION) {
panic("%s Platform Management API version error. Expected: v%d.%d - Found: v%d.%d\n",
__func__,
Expand Down

0 comments on commit 168e05c

Please sign in to comment.