Hello Andrew,
On 10/7/2025 5:34 PM, Andrew Goodbody wrote:
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 <[email protected]>
---
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
2042d88583766213e9d74dd17289cfd3562f0acb..afe1ae13834d236015a3d5e4d8d4f9955ba8c822
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;
I am looking on this patch, need to understand bit more , if this is
really failure or intentionally returning 0.
if you look at other conditions, those are marked as dev_err, this
particular condition marked as dev_dbg.
Please allow me some time.
}
if (msg->len > info->desc->max_msg_size) {