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 <[email protected]>
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 
534326be5ecedba1bf221d04d708b6db15f09706..6f57dcfe8de8f874318cd53372c798d182faae73
 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;

-- 
2.47.3

Reply via email to