mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-16 13:48:29 +00:00
afk: Fix edge case in ringbuf pointer assert
Signed-off-by: Martin Povišer <povik@cutebit.org>
This commit is contained in:
parent
fd0ae3663a
commit
07ea5a92c3
1 changed files with 1 additions and 1 deletions
|
@ -338,7 +338,7 @@ static void afk_epic_rx_ack(afk_epic_ep_t *epic)
|
|||
dma_mb();
|
||||
|
||||
rptr = ALIGN_UP(rptr + sizeof(*hdr) + hdr->size, 1 << BLOCK_SHIFT);
|
||||
assert(rptr < rb->bufsz);
|
||||
assert(rptr <= rb->bufsz);
|
||||
if (rptr == rb->bufsz)
|
||||
rptr = 0;
|
||||
rb->hdr->rptr = rptr;
|
||||
|
|
Loading…
Add table
Reference in a new issue