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

Jay Buddhabhatti jay.buddhabhatti at amd.com
Fri Jul 24 02:53:52 PDT 2026


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 at amd.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey at amd.com>
Reviewed-by: Prasanna Kumar T S M <ptsm at linux.microsoft.com>
---
 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




More information about the linux-arm-kernel mailing list