]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/isdn/i4l/isdn_common.c
trivial: fix typo "for for" in multiple files
[linux-beck.git] / drivers / isdn / i4l / isdn_common.c
index 0f3c66de69bcec511b89b9c72265ada93b2bc3c2..adb1e8c36b468ad736a3f9846956db8cc722e137 100644 (file)
@@ -761,7 +761,7 @@ isdn_getnum(char **p)
  * Be aware that this is not an atomic operation when sleep != 0, even though 
  * interrupts are turned off! Well, like that we are currently only called
  * on behalf of a read system call on raw device files (which are documented
- * to be dangerous and for for debugging purpose only). The inode semaphore
+ * to be dangerous and for debugging purpose only). The inode semaphore
  * takes care that this is not called for the same minor device number while
  * we are sleeping, but access is not serialized against simultaneous read()
  * from the corresponding ttyI device. Can other ugly events, like changes
@@ -873,7 +873,7 @@ isdn_readbchan(int di, int channel, u_char * buf, u_char * fp, int len, wait_que
  * Be aware that this is not an atomic operation when sleep != 0, even though
  * interrupts are turned off! Well, like that we are currently only called
  * on behalf of a read system call on raw device files (which are documented
- * to be dangerous and for for debugging purpose only). The inode semaphore
+ * to be dangerous and for debugging purpose only). The inode semaphore
  * takes care that this is not called for the same minor device number while
  * we are sleeping, but access is not serialized against simultaneous read()
  * from the corresponding ttyI device. Can other ugly events, like changes
@@ -1732,7 +1732,7 @@ isdn_open(struct inode *ino, struct file *filep)
        int chidx;
        int retval = -ENODEV;
 
-
+       lock_kernel();
        if (minor == ISDN_MINOR_STATUS) {
                infostruct *p;
 
@@ -1783,6 +1783,7 @@ isdn_open(struct inode *ino, struct file *filep)
 #endif
  out:
        nonseekable_open(ino, filep);
+       unlock_kernel();
        return retval;
 }
 
@@ -1977,8 +1978,10 @@ isdn_writebuf_stub(int drvidx, int chan, const u_char __user * buf, int len)
        if (!skb)
                return -ENOMEM;
        skb_reserve(skb, hl);
-       if (copy_from_user(skb_put(skb, len), buf, len))
+       if (copy_from_user(skb_put(skb, len), buf, len)) {
+               dev_kfree_skb(skb);
                return -EFAULT;
+       }
        ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb);
        if (ret <= 0)
                dev_kfree_skb(skb);