diff options
| author | Andrew Goodbody <[email protected]> | 2025-10-08 10:23:36 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-10-16 15:02:14 -0600 |
| commit | 4602fa92202388665ddfbb622f001d62b1473a08 (patch) | |
| tree | 5f83abf789abc493fa48c6776010b6ecc8121ce1 /drivers/firmware | |
| parent | 4b8bc5af80f1637cd71a1b6a0dffa7588a03f27c (diff) | |
ti_sci: Provide error code on error exit
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.
Also change dev_dbg call to dev_err to be consistent with other error
detection code in the same function.
This issue was found by Smatch.
Reviewed-by: Udit Kumar <[email protected]>
Signed-off-by: Andrew Goodbody <[email protected]>
Reviewed-by: Nishanth Menon <[email protected]>
Tested-by: Anshul Dalal <[email protected]>
Diffstat (limited to 'drivers/firmware')
| -rw-r--r-- | drivers/firmware/ti_sci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index 2042d885837..534326be5ec 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -191,9 +191,9 @@ static int ti_sci_get_response(struct ti_sci_info *info, /* Sanity check for message response */ if (hdr->seq != info->seq) { - dev_dbg(info->dev, "%s: Message for %d is not expected\n", + dev_err(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) { |
