]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/isdn/gigaset/isocdata.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
[linux-2.6-omap-h63xx.git] / drivers / isdn / gigaset / isocdata.c
index 45f017ed6e8caf093bca94fc9422c9bb87cafff5..8667daaa1a82e74eb74af3704ea4021e283c50e6 100644 (file)
@@ -992,14 +992,18 @@ int gigaset_isoc_send_skb(struct bc_state *bcs, struct sk_buff *skb)
        int len = skb->len;
        unsigned long flags;
 
+       spin_lock_irqsave(&bcs->cs->lock, flags);
+       if (!bcs->cs->connected) {
+               spin_unlock_irqrestore(&bcs->cs->lock, flags);
+               return -ENODEV;
+       }
+
        skb_queue_tail(&bcs->squeue, skb);
        gig_dbg(DEBUG_ISO, "%s: skb queued, qlen=%d",
                __func__, skb_queue_len(&bcs->squeue));
 
        /* tasklet submits URB if necessary */
-       spin_lock_irqsave(&bcs->cs->lock, flags);
-       if (bcs->cs->connected)
-               tasklet_schedule(&bcs->hw.bas->sent_tasklet);
+       tasklet_schedule(&bcs->hw.bas->sent_tasklet);
        spin_unlock_irqrestore(&bcs->cs->lock, flags);
 
        return len;     /* ok so far */