aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wan/dlci.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c
index df65aca..af44b93 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;