fix(k3): increment while reading trail bytes

The trail bytes from the secure proxy driver were being overwritten,
increase the count each time to not overwrite the existing data and not
get the end data corrupted from secure proxy.

Fixes: d76fdd33e0 ("ti: k3: drivers: Add Secure Proxy driver")

Change-Id: I8e23f8b6959da886d6ab43049746f78765ae1766
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
This commit is contained in:
Manorit Chawdhry 2024-01-17 15:06:58 +05:30
parent 89b9d96573
commit 0bdaf5c804

View file

@ -320,7 +320,7 @@ int k3_sec_proxy_recv(enum k3_sec_proxy_chan_id id, struct k3_sec_proxy_msg *msg
i = msg->len - trail_bytes;
while (trail_bytes--) {
msg->buf[i] = data_trail & 0xff;
msg->buf[i++] = data_trail & 0xff;
data_trail >>= 8;
}
}