netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: lan966x: Remove a useless test in lan966x_ptp_add_trap()
@ 2022-12-12 19:37 Christophe JAILLET
  2022-12-13  3:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2022-12-12 19:37 UTC (permalink / raw)
  To: Horatiu Vultur, UNGLinuxDriver, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, netdev

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(-)

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);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: lan966x: Remove a useless test in lan966x_ptp_add_trap()
  2022-12-12 19:37 [PATCH net-next] net: lan966x: Remove a useless test in lan966x_ptp_add_trap() Christophe JAILLET
@ 2022-12-13  3:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-13  3:50 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: horatiu.vultur, UNGLinuxDriver, davem, edumazet, kuba, pabeni,
	richardcochran, linux-kernel, kernel-janitors, netdev

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-13  3:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-12 19:37 [PATCH net-next] net: lan966x: Remove a useless test in lan966x_ptp_add_trap() Christophe JAILLET
2022-12-13  3:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).