summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wwan/iosm/iosm_ipc_wwan.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/net/wwan/iosm/iosm_ipc_wwan.c b/drivers/net/wwan/iosm/iosm_ipc_wwan.c
index 1711b79fc616..bee9b278223d 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_wwan.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_wwan.c
@@ -329,22 +329,9 @@ struct iosm_wwan *ipc_wwan_init(struct iosm_imem *ipc_imem, struct device *dev)
void ipc_wwan_deinit(struct iosm_wwan *ipc_wwan)
{
- int if_id;
-
+ /* This call will remove all child netdev(s) */
wwan_unregister_ops(ipc_wwan->dev);
- for (if_id = 0; if_id < ARRAY_SIZE(ipc_wwan->sub_netlist); if_id++) {
- struct iosm_netdev_priv *priv;
-
- priv = rcu_access_pointer(ipc_wwan->sub_netlist[if_id]);
- if (!priv)
- continue;
-
- rtnl_lock();
- ipc_wwan_dellink(ipc_wwan, priv->netdev, NULL);
- rtnl_unlock();
- }
-
mutex_destroy(&ipc_wwan->if_mutex);
kfree(ipc_wwan);