From: Andrew Goodbody Date: Wed, 8 Oct 2025 09:23:37 +0000 (+0100) Subject: ti_sci: Pointer is never assigned to valid value X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b9125746dfde0a29911ccd542801da6b8f94239;p=pandora-u-boot.git ti_sci: Pointer is never assigned to valid value 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. Reviewed-by: Udit Kumar Signed-off-by: Andrew Goodbody Reviewed-by: Nishanth Menon Tested-by: Anshul Dalal --- diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index 534326be5ec..6f57dcfe8de 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; + *parent_id = resp->parent_id; return ret;