mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-16 13:48:29 +00:00
afk: Add missing wptr wraparound
Signed-off-by: Martin Povišer <povik@cutebit.org>
This commit is contained in:
parent
264e18169f
commit
f7824561af
1 changed files with 2 additions and 0 deletions
|
@ -302,6 +302,8 @@ static int afk_epic_tx(afk_epic_ep_t *epic, u32 channel, u32 type, void *data, s
|
|||
|
||||
wptr += size;
|
||||
wptr = ALIGN_UP(wptr, 1 << BLOCK_SHIFT);
|
||||
if (wptr >= rb->bufsz)
|
||||
wptr = 0;
|
||||
|
||||
memcpy(hdr + 1, data, size);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue