diff options
Diffstat (limited to 'drivers/isdn/i4l')
-rw-r--r-- | drivers/isdn/i4l/isdn_net.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index 7c5f97033b9f..de6be7181f07 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c | |||
@@ -292,7 +292,9 @@ isdn_net_unbind_channel(isdn_net_local * lp) | |||
292 | lp->dialstate = 0; | 292 | lp->dialstate = 0; |
293 | dev->rx_netdev[isdn_dc2minor(lp->isdn_device, lp->isdn_channel)] = NULL; | 293 | dev->rx_netdev[isdn_dc2minor(lp->isdn_device, lp->isdn_channel)] = NULL; |
294 | dev->st_netdev[isdn_dc2minor(lp->isdn_device, lp->isdn_channel)] = NULL; | 294 | dev->st_netdev[isdn_dc2minor(lp->isdn_device, lp->isdn_channel)] = NULL; |
295 | isdn_free_channel(lp->isdn_device, lp->isdn_channel, ISDN_USAGE_NET); | 295 | if (lp->isdn_device != -1 && lp->isdn_channel != -1) |
296 | isdn_free_channel(lp->isdn_device, lp->isdn_channel, | ||
297 | ISDN_USAGE_NET); | ||
296 | lp->flags &= ~ISDN_NET_CONNECTED; | 298 | lp->flags &= ~ISDN_NET_CONNECTED; |
297 | lp->isdn_device = -1; | 299 | lp->isdn_device = -1; |
298 | lp->isdn_channel = -1; | 300 | lp->isdn_channel = -1; |