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 17:00:16 -0400
commita5d8091052e918864cce3b1590bbfdfb73dc8b41 (patch)
treeaefff8bda2bb642126f62701d0c366a6f2166768
parentc28a1e0605fc7d8c33d5b8f3f330239680867bd7 (diff)
downloadu-boot-WIP/2023-10-13-firmware-scmi-updates.zip
u-boot-WIP/2023-10-13-firmware-scmi-updates.tar.gz
u-boot-WIP/2023-10-13-firmware-scmi-updates.tar.bz2
firmware: scmi: Fix clearing variableWIP/2023-10-13-firmware-scmi-updates
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)