diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index 7fc1bbf51c44452380d6ff19d3f9843df5e5027e..54a038943c0649f74f72c8bdb5120d9c285ce8d2 100644 --- a/drivers/net/ethernet/marvell/mvpp2.c +++ b/drivers/net/ethernet/marvell/mvpp2.c @@ -1604,7 +1604,7 @@ static int mvpp2_prs_init_from_hw(struct mvpp2 *priv, { int i; - if (pe->index > MVPP2_PRS_TCAM_SRAM_SIZE - 1) + if (tid > MVPP2_PRS_TCAM_SRAM_SIZE - 1) return -EINVAL; memset(pe, 0, sizeof(*pe));