netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] bonding: delete always true device check
@ 2025-02-03 12:59 Leon Romanovsky
  2025-02-04 12:49 ` Paolo Abeni
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Leon Romanovsky @ 2025-02-03 12:59 UTC (permalink / raw)
  To: Jay Vosburgh
  Cc: Leon Romanovsky, Andrew Lunn, David S. Miller, Eric Dumazet,
	Hangbin Liu, Jakub Kicinski, netdev, Nikolay Aleksandrov,
	Paolo Abeni

From: Leon Romanovsky <leonro@nvidia.com>

XFRM API makes sure that xs->xso.dev is valid in all XFRM offload
callbacks. There is no need to check it again.

Fixes: 1ddec5d0eec4 ("bonding: add common function to check ipsec device")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
There is nothing urgent in this change, it can go to net-next too.
---
 drivers/net/bonding/bond_main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index bfb55c23380b..154e670d8075 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -432,9 +432,6 @@ static struct net_device *bond_ipsec_dev(struct xfrm_state *xs)
 	struct bonding *bond;
 	struct slave *slave;
 
-	if (!bond_dev)
-		return NULL;
-
 	bond = netdev_priv(bond_dev);
 	if (BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP)
 		return NULL;
-- 
2.48.1


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

end of thread, other threads:[~2025-02-04 22:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-03 12:59 [PATCH net-next] bonding: delete always true device check Leon Romanovsky
2025-02-04 12:49 ` Paolo Abeni
2025-02-04 16:38 ` Nikolay Aleksandrov
2025-02-04 22:20 ` 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).