提交 d1c72286 编写于 作者: C Christophe JAILLET 提交者: Jakub Kicinski

net: lan966x: Remove a useless test in lan966x_ptp_add_trap()

vcap_alloc_rule() can't return NULL.

So remove some dead-code
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/27992ffcee47fc865ce87274d6dfcffe7a1e69e0.1670873784.git.christophe.jaillet@wanadoo.frSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 c4b7a297
...@@ -76,8 +76,6 @@ static int lan966x_ptp_add_trap(struct lan966x_port *port, ...@@ -76,8 +76,6 @@ static int lan966x_ptp_add_trap(struct lan966x_port *port,
vrule = vcap_alloc_rule(lan966x->vcap_ctrl, port->dev, vrule = vcap_alloc_rule(lan966x->vcap_ctrl, port->dev,
LAN966X_VCAP_CID_IS2_L0, LAN966X_VCAP_CID_IS2_L0,
VCAP_USER_PTP, 0, rule_id); VCAP_USER_PTP, 0, rule_id);
if (!vrule)
return -ENOMEM;
if (IS_ERR(vrule)) if (IS_ERR(vrule))
return PTR_ERR(vrule); return PTR_ERR(vrule);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册