net: stmmac: Do not return error code in TC Initialization
authorJose Abreu <Jose.Abreu@synopsys.com>
Wed, 4 Sep 2019 13:16:55 +0000 (15:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Sep 2019 10:19:54 +0000 (12:19 +0200)
As we can still use the remaining TC callbacks, e.g. CBS. We should not
fail in the initialization only because RX Parser is not available.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c

index 6c305b6ecad04a9077f15e6f063bc5aba6914561..8dbbbf181ada74f6c2e8e209e541dad65e14aacb 100644 (file)
@@ -243,8 +243,9 @@ static int tc_init(struct stmmac_priv *priv)
        struct dma_features *dma_cap = &priv->dma_cap;
        unsigned int count;
 
+       /* Fail silently as we can still use remaining features, e.g. CBS */
        if (!dma_cap->frpsel)
-               return -EINVAL;
+               return 0;
 
        switch (dma_cap->frpbs) {
        case 0x0: