[PATCH 3/3] ti_sci: Pointer is never assigned to

Kumar, Udit u-kumar1 at ti.com
Mon Oct 6 19:24:59 CEST 2025


On 10/6/2025 8:50 PM, Andrew Goodbody wrote:
> The pointer resp is declared but never assigned a value but is then
> dereferenced. Fix this by assigning the pointer to the message buffer.
>
> 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, 2 insertions(+)
>
> diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
> index bd8a8f6c6b35e9038f5fb9927927d5b664ae5a3a..6def152f00a9442fcd0037c8f4032235d8c7fdab 100644
> --- a/drivers/firmware/ti_sci.c
> +++ b/drivers/firmware/ti_sci.c
> @@ -1365,6 +1365,8 @@ static int ti_sci_cmd_clk_get_parent(const struct ti_sci_handle *handle,
>   	if (ret)
>   		return ret;
>   
> +	resp = xfer->tx_message.buf;
> +

Thanks for catching this. buf is u32*, consider to do typecasting

resp = (struct ti_sci_msg_resp_get_clock_parent *) xfer->tx_message.buf;


>   	*parent_id = resp->parent_id;
>   
>   	return ret;
>


More information about the U-Boot mailing list