net: stmmac: simplify the return tc_delete_knode()
authorZheng Yongjun <zhengyongjun3@huawei.com>
Thu, 10 Dec 2020 13:48:33 +0000 (21:48 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Dec 2020 20:58:55 +0000 (12:58 -0800)
Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c

index cc27d66..f5bed4d 100644 (file)
@@ -209,17 +209,11 @@ err_unfill:
 static int tc_delete_knode(struct stmmac_priv *priv,
                           struct tc_cls_u32_offload *cls)
 {
-       int ret;
-
        /* Set entry and fragments as not used */
        tc_unfill_entry(priv, cls);
 
-       ret = stmmac_rxp_config(priv, priv->hw->pcsr, priv->tc_entries,
-                       priv->tc_entries_max);
-       if (ret)
-               return ret;
-
-       return 0;
+       return stmmac_rxp_config(priv, priv->hw->pcsr, priv->tc_entries,
+                                priv->tc_entries_max);
 }
 
 static int tc_setup_cls_u32(struct stmmac_priv *priv,