]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/isdn/i4l/isdn_tty.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
[linux-2.6-omap-h63xx.git] / drivers / isdn / i4l / isdn_tty.c
index f190a99604f0c3821c9e97e865819e4d89dfc144..3585fb1f334460ae69a3c24e32c0ee03d52def49 100644 (file)
@@ -1682,6 +1682,7 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
 #ifdef ISDN_DEBUG_MODEM_OPEN
                printk(KERN_DEBUG "isdn_tty_close after info->count != 0\n");
 #endif
+               module_put(info->owner);
                return;
        }
        info->flags |= ISDN_ASYNC_CLOSING;
@@ -2344,12 +2345,15 @@ isdn_tty_at_cout(char *msg, modem_info * info)
        u_long flags;
        struct sk_buff *skb = NULL;
        char *sp = NULL;
-       int l = strlen(msg);
+       int l;
 
        if (!msg) {
                printk(KERN_WARNING "isdn_tty: Null-Message in isdn_tty_at_cout\n");
                return;
        }
+
+       l = strlen(msg);
+
        spin_lock_irqsave(&info->readlock, flags);
        tty = info->tty;
        if ((info->flags & ISDN_ASYNC_CLOSING) || (!tty)) {
@@ -2359,8 +2363,8 @@ isdn_tty_at_cout(char *msg, modem_info * info)
 
        /* use queue instead of direct, if online and */
        /* data is in queue or buffer is full */
-       if ((info->online && tty_buffer_request_room(tty, l) < l) ||
-           (!skb_queue_empty(&dev->drv[info->isdn_driver]->rpqueue[info->isdn_channel]))) {
+       if (info->online && ((tty_buffer_request_room(tty, l) < l) ||
+           !skb_queue_empty(&dev->drv[info->isdn_driver]->rpqueue[info->isdn_channel]))) {
                skb = alloc_skb(l, GFP_ATOMIC);
                if (!skb) {
                        spin_unlock_irqrestore(&info->readlock, flags);