diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-04-27 04:53:34 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-27 04:53:34 -0400 |
commit | acc696d93dcf993dec123d69d599979e1456ffec (patch) | |
tree | b860b80bb96bb5e3ea1f0347b92fbb1e8b15af36 /drivers/isdn/gigaset/isocdata.c | |
parent | bf2af2a2027e52b653882fbca840620e896ae081 (diff) | |
parent | 2be4d50295e2b6f62c07b614e1b103e280dddb84 (diff) |
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/isdn/gigaset/isocdata.c')
-rw-r--r-- | drivers/isdn/gigaset/isocdata.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/isdn/gigaset/isocdata.c b/drivers/isdn/gigaset/isocdata.c index 45f017ed6e8..8667daaa1a8 100644 --- a/drivers/isdn/gigaset/isocdata.c +++ b/drivers/isdn/gigaset/isocdata.c @@ -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 */ |