Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100314
b: refs/heads/master
c: a237f3b
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent d6ea9a6 commit f5a82d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 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: b0061a0ec4d10a69309d0371a01e8b99387009ef
refs/heads/master: a237f3bbaab28bb780201f15f6003cf3d2e81024
17 changes: 11 additions & 6 deletions trunk/drivers/isdn/capi/capi.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/signal.h>
#include <linux/mutex.h>
#include <linux/mm.h>
#include <linux/smp_lock.h>
#include <linux/timer.h>
#include <linux/wait.h>
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
Expand Down Expand Up @@ -983,13 +984,17 @@ capi_ioctl(struct inode *inode, struct file *file,
static int
capi_open(struct inode *inode, struct file *file)
{
int ret;

lock_kernel();
if (file->private_data)
return -EEXIST;

if ((file->private_data = capidev_alloc()) == NULL)
return -ENOMEM;

return nonseekable_open(inode, file);
ret = -EEXIST;
else if ((file->private_data = capidev_alloc()) == NULL)
ret = -ENOMEM;
else
ret = nonseekable_open(inode, file);
unlock_kernel();
return ret;
}

static int
Expand Down

0 comments on commit f5a82d4

Please sign in to comment.