summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/rmnet_data/rmnet_data_config.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/rmnet_data/rmnet_data_config.c b/net/rmnet_data/rmnet_data_config.c
index a166a60cd1b7..c49393924e26 100644
--- a/net/rmnet_data/rmnet_data_config.c
+++ b/net/rmnet_data/rmnet_data_config.c
@@ -1195,7 +1195,7 @@ static void rmnet_force_unassociate_device(struct net_device *dev)
int rmnet_config_notify_cb(struct notifier_block *nb,
unsigned long event, void *data)
{
- struct net_device *dev = (struct net_device *)data;
+ struct net_device *dev = netdev_notifier_info_to_dev(data);
if (!dev)
BUG();
@@ -1206,10 +1206,8 @@ int rmnet_config_notify_cb(struct notifier_block *nb,
case NETDEV_UNREGISTER_FINAL:
case NETDEV_UNREGISTER:
trace_rmnet_unregister_cb_entry(dev);
- if (_rmnet_is_physical_endpoint_associated(dev)) {
- LOGH("Kernel is trying to unregister %s", dev->name);
- rmnet_force_unassociate_device(dev);
- }
+ LOGH("Kernel is trying to unregister %s", dev->name);
+ rmnet_force_unassociate_device(dev);
trace_rmnet_unregister_cb_exit(dev);
break;