summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2022-12-12 22:37:16 +0300
committerJakub Kicinski <kuba@kernel.org>2022-12-13 06:39:24 +0300
commitd1c722867f8022a27182b9a1d84e9bca75486c9a (patch)
treeac403302042b9167936162561898d1d2a8d7fb7f /drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
parentc4b7a297217a22e4b36afd6d298ae9c7583ae7f9 (diff)
downloadlinux-d1c722867f8022a27182b9a1d84e9bca75486c9a.tar.xz
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/27992ffcee47fc865ce87274d6dfcffe7a1e69e0.1670873784.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c')
-rw-r--r--drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c b/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
index 300fe4005919..f9ebfaafbebc 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
@@ -76,8 +76,6 @@ static int lan966x_ptp_add_trap(struct lan966x_port *port,
vrule = vcap_alloc_rule(lan966x->vcap_ctrl, port->dev,
LAN966X_VCAP_CID_IS2_L0,
VCAP_USER_PTP, 0, rule_id);
- if (!vrule)
- return -ENOMEM;
if (IS_ERR(vrule))
return PTR_ERR(vrule);