[PATCH v2 2/3] ti_sci: Provide error code on error exit
Kumar, Udit
u-kumar1 at ti.com
Wed Oct 8 10:11:58 CEST 2025
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 <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 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;
While you are at this, Please change dev_dbg to dev_err,
with this change, Please use
Reviewed-by: Udit Kumar <u-kumar1 at ti.com>
> }
>
> if (msg->len > info->desc->max_msg_size) {
>
More information about the U-Boot
mailing list