Hello Andrew,

On 10/7/2025 5:34 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.

Tom, may comment, if need Fixes tag for this

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <[email protected]>
---
  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 
afe1ae13834d236015a3d5e4d8d4f9955ba8c822..91edbc7898132bc10fcf4bd6a71c1e7aebd5147d
 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 = (struct ti_sci_msg_resp_get_clock_parent *)xfer->tx_message.buf;
+

Sorry but subject (ti_sci: Pointer is never assigned to) does not complete story,

Please update subject to (ti_sci: Pointer is never assigned to valid value)

with subject change , Please use

Reviewed-by: Udit Kumar <[email protected]>

        *parent_id = resp->parent_id;
return ret;

Reply via email to