File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -1169,6 +1169,11 @@ static int adin1110_port_bridge_leave(struct adin1110_port_priv *port_priv,
1169
1169
return ret ;
1170
1170
}
1171
1171
1172
+ static bool adin1110_port_dev_check (const struct net_device * dev )
1173
+ {
1174
+ return dev -> netdev_ops == & adin1110_netdev_ops ;
1175
+ }
1176
+
1172
1177
static int adin1110_netdevice_event (struct notifier_block * unused ,
1173
1178
unsigned long event , void * ptr )
1174
1179
{
@@ -1177,6 +1182,9 @@ static int adin1110_netdevice_event(struct notifier_block *unused,
1177
1182
struct netdev_notifier_changeupper_info * info = ptr ;
1178
1183
int ret = 0 ;
1179
1184
1185
+ if (!adin1110_port_dev_check (dev ))
1186
+ return NOTIFY_DONE ;
1187
+
1180
1188
switch (event ) {
1181
1189
case NETDEV_CHANGEUPPER :
1182
1190
if (netif_is_bridge_master (info -> upper_dev )) {
@@ -1202,11 +1210,6 @@ static void adin1110_disconnect_phy(void *data)
1202
1210
phy_disconnect (data );
1203
1211
}
1204
1212
1205
- static bool adin1110_port_dev_check (const struct net_device * dev )
1206
- {
1207
- return dev -> netdev_ops == & adin1110_netdev_ops ;
1208
- }
1209
-
1210
1213
static int adin1110_port_set_forwarding_state (struct adin1110_port_priv * port_priv )
1211
1214
{
1212
1215
struct adin1110_priv * priv = port_priv -> priv ;
You can’t perform that action at this time.
0 commit comments