[PATCH] firmware: scmi: Fix clearing variable

The sess variable in open_channel was not entirely cleared to zero at the start of this function.
This commit ensures that the entire struct is cleared.
Signed-off-by: Francois Berder fberder@outlook.fr --- drivers/firmware/scmi/optee_agent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/scmi/optee_agent.c b/drivers/firmware/scmi/optee_agent.c index db927fb214..1247d0b03e 100644 --- a/drivers/firmware/scmi/optee_agent.c +++ b/drivers/firmware/scmi/optee_agent.c @@ -149,7 +149,7 @@ static int open_channel(struct udevice *dev, struct scmi_optee_channel *chan, struct tee_param param[1] = { }; int ret;
- memset(sess, 0, sizeof(sess)); + memset(sess, 0, sizeof(*sess));
sess->tee = tee_find_device(NULL, NULL, NULL, NULL); if (!sess->tee)

On Tue, Oct 10, 2023 at 07:44:32PM +0200, Francois Berder wrote:
The sess variable in open_channel was not entirely cleared to zero at the start of this function.
This commit ensures that the entire struct is cleared.
Signed-off-by: Francois Berder fberder@outlook.fr
Applied to u-boot/master, thanks!
participants (2)
-
Francois Berder
-
Tom Rini