Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31224
b: refs/heads/master
c: 09fca29
h: refs/heads/master
v: v3
  • Loading branch information
Karsten Keil authored and Linus Torvalds committed Jun 29, 2006
1 parent ec67d4e commit 8f90248
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0f6c10ead876492b386a19474e6dca4710eeef8e
refs/heads/master: 09fca29de4bdfd7eff47acbc6bd71c5fb5b79d79
18 changes: 17 additions & 1 deletion trunk/drivers/isdn/i4l/isdn_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,16 @@ isdn_command(isdn_ctrl *cmd)
printk(KERN_WARNING "isdn_command command(%x) driver -1\n", cmd->command);
return(1);
}
if (!dev->drv[cmd->driver]) {
printk(KERN_WARNING "isdn_command command(%x) dev->drv[%d] NULL\n",
cmd->command, cmd->driver);
return(1);
}
if (!dev->drv[cmd->driver]->interface) {
printk(KERN_WARNING "isdn_command command(%x) dev->drv[%d]->interface NULL\n",
cmd->command, cmd->driver);
return(1);
}
if (cmd->command == ISDN_CMD_SETL2) {
int idx = isdn_dc2minor(cmd->driver, cmd->arg & 255);
unsigned long l2prot = (cmd->arg >> 8) & 255;
Expand Down Expand Up @@ -1903,6 +1913,11 @@ isdn_free_channel(int di, int ch, int usage)
{
int i;

if ((di < 0) || (ch < 0)) {
printk(KERN_WARNING "%s: called with invalid drv(%d) or channel(%d)\n",
__FUNCTION__, di, ch);
return;
}
for (i = 0; i < ISDN_MAX_CHANNELS; i++)
if (((!usage) || ((dev->usage[i] & ISDN_USAGE_MASK) == usage)) &&
(dev->drvmap[i] == di) &&
Expand All @@ -1918,7 +1933,8 @@ isdn_free_channel(int di, int ch, int usage)
dev->v110[i] = NULL;
// 20.10.99 JIM, try to reinitialize v110 !
isdn_info_update();
skb_queue_purge(&dev->drv[di]->rpqueue[ch]);
if (dev->drv[di])
skb_queue_purge(&dev->drv[di]->rpqueue[ch]);
}
}

Expand Down

0 comments on commit 8f90248

Please sign in to comment.