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

Commit 914365f1 authored by Yan Markman's avatar Yan Markman Committed by David S. Miller
Browse files

net: mvpp2: avoid checking for free aggregated descriptors twice



Avoid repeating the check for free aggregated descriptors when it
already failed at the beginning of the function.

Signed-off-by: default avatarYan Markman <ymarkman@marvell.com>
[Antoine: commit message]
Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 808e2fc3
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -5487,11 +5487,10 @@ static int mvpp2_aggr_desc_num_check(struct mvpp2 *priv,
					     MVPP2_AGGR_TXQ_STATUS_REG(cpu));

		aggr_txq->count = val & MVPP2_AGGR_TXQ_PENDING_MASK;
	}

		if ((aggr_txq->count + num) > MVPP2_AGGR_TXQ_SIZE)
			return -ENOMEM;

	}
	return 0;
}