[PATCH 2/3] ti_sci: Provide error code on error exit
Andrew Goodbody
andrew.goodbody at linaro.org
Mon Oct 6 17:20:00 CEST 2025
In ti_sci_get_response the check for message sequence will return ret
on a fail but ret will be 0 at that point. Instead return -EINVAL.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
---
drivers/firmware/ti_sci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index f262da188f675b95ae217df418dc6df0364b4425..bd8a8f6c6b35e9038f5fb9927927d5b664ae5a3a 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -193,7 +193,7 @@ static int ti_sci_get_response(struct ti_sci_info *info,
if (hdr->seq != info->seq) {
dev_dbg(info->dev, "%s: Message for %d is not expected\n",
__func__, hdr->seq);
- return ret;
+ return -EINVAL;
}
if (msg->len > info->desc->max_msg_size) {
--
2.47.3
More information about the U-Boot
mailing list