Skip to content

Commit d1c7228

Browse files
tititiou36kuba-moo
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/27992ffcee47fc865ce87274d6dfcffe7a1e69e0.1670873784.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c4b7a29 commit d1c7228

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ static int lan966x_ptp_add_trap(struct lan966x_port *port,
7676
vrule = vcap_alloc_rule(lan966x->vcap_ctrl, port->dev,
7777
LAN966X_VCAP_CID_IS2_L0,
7878
VCAP_USER_PTP, 0, rule_id);
79-
if (!vrule)
80-
return -ENOMEM;
8179
if (IS_ERR(vrule))
8280
return PTR_ERR(vrule);
8381

0 commit comments

Comments
 (0)