[PATCH 2/2] firmware: xilinx: Propagate actual error from feature check

From: Jay Buddhabhatti

Date: Fri Jul 24 2026 - 05:55:43 EST


When do_fw_call() fails in __do_feature_check_call(), propagate the
actual errno from zynqmp_pm_ret_code() instead of always returning
-EOPNOTSUPP. This gives callers more precise error information. Existing
callers only test ret < 0 and are unchanged by this.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@xxxxxxx>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xxxxxxx>
Reviewed-by: Prasanna Kumar T S M <ptsm@xxxxxxxxxxxxxxxxxxx>
---
drivers/firmware/xilinx/zynqmp.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
index 95f5941c5ca8..0b6c20a1d8be 100644
--- a/drivers/firmware/xilinx/zynqmp.c
+++ b/drivers/firmware/xilinx/zynqmp.c
@@ -252,11 +252,9 @@ static int __do_feature_check_call(const u32 api_id, u32 *ret_payload)
}

if (ret)
- ret = -EOPNOTSUPP;
- else
- ret = ret_payload[1];
+ return ret;

- return ret;
+ return ret_payload[1];
}

static int do_feature_check_call(const u32 api_id)
--
2.34.1