diff mbox series

[net-next] net: sja1105: simplify the return sja1105_cls_flower_stats()

Message ID 20201209092504.20470-1-zhengyongjun3@huawei.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: sja1105: simplify the return sja1105_cls_flower_stats() | expand

Checks

Context Check Description
netdev/apply fail Patch does not apply to net-next
netdev/tree_selection success Clearly marked for net-next

Commit Message

Zheng Yongjun Dec. 9, 2020, 9:25 a.m. UTC
Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/net/dsa/sja1105/sja1105_flower.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Vladimir Oltean Dec. 9, 2020, 10:32 a.m. UTC | #1
On Wed, Dec 09, 2020 at 05:25:04PM +0800, Zheng Yongjun wrote:
> Simplify the return expression.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Jakub Kicinski Dec. 9, 2020, 7:42 p.m. UTC | #2
On Wed, 9 Dec 2020 17:25:04 +0800 Zheng Yongjun wrote:
> Simplify the return expression.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>

Looks like this one doesn't apply cleanly to net-next.
David Miller Dec. 10, 2020, 1:13 a.m. UTC | #3
From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Wed, 9 Dec 2020 17:25:04 +0800

> Simplify the return expression.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>

Applied.
diff mbox series

Patch

diff --git a/drivers/net/dsa/sja1105/sja1105_flower.c b/drivers/net/dsa/sja1105/sja1105_flower.c
index 12e76020bea3..e9617782e0d0 100644
--- a/drivers/net/dsa/sja1105/sja1105_flower.c
+++ b/drivers/net/dsa/sja1105/sja1105_flower.c
@@ -458,7 +458,6 @@  int sja1105_cls_flower_stats(struct dsa_switch *ds, int port,
 {
 	struct sja1105_private *priv = ds->priv;
 	struct sja1105_rule *rule = sja1105_rule_find(priv, cls->cookie);
-	int rc;
 
 	if (!rule)
 		return 0;
@@ -466,12 +465,8 @@  int sja1105_cls_flower_stats(struct dsa_switch *ds, int port,
 	if (rule->type != SJA1105_RULE_VL)
 		return 0;
 
-	rc = sja1105_vl_stats(priv, port, rule, &cls->stats,
+	return sja1105_vl_stats(priv, port, rule, &cls->stats,
 				cls->common.extack);
-	if (rc)
-		return rc;
-
-	return 0;
 }
 
 void sja1105_flower_setup(struct dsa_switch *ds)