Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8da79863 authored by Julian Andres Klode's avatar Julian Andres Klode Committed by Greg Kroah-Hartman
Browse files

staging: nvec: Handle filled up RX buffers



If no RX buffer is available in state 1, jump to state
0 again. This will produce an incredible amount of
warnings, but it is not supposed to happen anyway.

Signed-off-by: default avatarJulian Andres Klode <jak@jak-linux.org>
Acked-by: default avatarMarc Dietrich <marvin24@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent bb0590e2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -554,6 +554,11 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
			nvec_invalid_flags(nvec, status, true);
		} else {
			nvec->rx = nvec_msg_alloc(nvec, NVEC_MSG_RX);
			/* Should not happen in a normal world */
			if (unlikely(nvec->rx == NULL)) {
				nvec->state = 0;
				break;
			}
			nvec->rx->data[0] = received;
			nvec->rx->pos = 1;
			nvec->state = 2;