[net-next] net: lan966x: Remove a useless test in lan966x_ptp_add_trap()
Commit Message
vcap_alloc_rule() can't return NULL.
So remove some dead-code
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c | 2 --
1 file changed, 2 deletions(-)
Comments
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 12 Dec 2022 20:37:16 +0100 you wrote:
> vcap_alloc_rule() can't return NULL.
>
> So remove some dead-code
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c | 2 --
> 1 file changed, 2 deletions(-)
Here is the summary with links:
- [net-next] net: lan966x: Remove a useless test in lan966x_ptp_add_trap()
https://git.kernel.org/netdev/net-next/c/d1c722867f80
You are awesome, thank you!
@@ -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);