aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois Berder <fberder@outlook.fr>2023-10-10 19:44:32 +0200
committerTom Rini <trini@konsulko.com>2023-10-13 21:21:07 -0400
commit66abf2bba36f8c5f3929b6de6fa377350d52bdd8 (patch)
tree636b2beef8d9056926eee1d61b94d90e800b3b58
parent8057d8a66f9e6df9c6264ab8955d2dd416f23480 (diff)
downloadu-boot-66abf2bba36f8c5f3929b6de6fa377350d52bdd8.zip
u-boot-66abf2bba36f8c5f3929b6de6fa377350d52bdd8.tar.gz
u-boot-66abf2bba36f8c5f3929b6de6fa377350d52bdd8.tar.bz2
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>
-rw-r--r--drivers/firmware/scmi/optee_agent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/scmi/optee_agent.c b/drivers/firmware/scmi/optee_agent.c
index e3e4627..48dbb88 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)