diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wan/dlci.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c index df65acae7aa4..af44b931b8ba 100644 --- a/drivers/net/wan/dlci.c +++ b/drivers/net/wan/dlci.c @@ -377,6 +377,7 @@ static int dlci_del(struct dlci_add *dlci) struct frad_local *flp; struct net_device *master, *slave; int err; + bool found = false; rtnl_lock(); @@ -387,6 +388,17 @@ static int dlci_del(struct dlci_add *dlci) goto out; } + list_for_each_entry(dlp, &dlci_devs, list) { + if (dlp->master == master) { + found = true; + break; + } + } + if (!found) { + err = -ENODEV; + goto out; + } + if (netif_running(master)) { err = -EBUSY; goto out; |