Skip to contentSkip to conversation

net: dsa: Utilize dsa_slave_dev_check()

PATCH Applied Florian Fainelli 3 participants 3 messages Sep 20, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: Utilize dsa_slave_dev_check()

Instead of open coding the check.

---
 net/dsa/slave.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/dsa/slave.c +1 -1
index d51b10450e1b..6fc9eb094267 100644
@@ -1294,7 +1294,7 @@ static int dsa_slave_netdevice_event(struct notifier_block *nb,
 {
 	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
 
-	if (dev->netdev_ops != &dsa_slave_netdev_ops)
+	if (!dsa_slave_dev_check(dev))
 		return NOTIFY_DONE;
 
 	if (event == NETDEV_CHANGEUPPER)
Signature · 1 line
2.9.3