diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/atm/usbatm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c index 07228721cafe..0da2c25bab3b 100644 --- a/drivers/usb/atm/usbatm.c +++ b/drivers/usb/atm/usbatm.c | |||
@@ -640,14 +640,13 @@ static void usbatm_cancel_send(struct usbatm_data *instance, | |||
640 | 640 | ||
641 | atm_dbg(instance, "%s entered\n", __func__); | 641 | atm_dbg(instance, "%s entered\n", __func__); |
642 | spin_lock_irq(&instance->sndqueue.lock); | 642 | spin_lock_irq(&instance->sndqueue.lock); |
643 | for (skb = instance->sndqueue.next, n = skb->next; | 643 | skb_queue_walk_safe(&instance->sndqueue, skb, n) { |
644 | skb != (struct sk_buff *)&instance->sndqueue; | ||
645 | skb = n, n = skb->next) | ||
646 | if (UDSL_SKB(skb)->atm.vcc == vcc) { | 644 | if (UDSL_SKB(skb)->atm.vcc == vcc) { |
647 | atm_dbg(instance, "%s: popping skb 0x%p\n", __func__, skb); | 645 | atm_dbg(instance, "%s: popping skb 0x%p\n", __func__, skb); |
648 | __skb_unlink(skb, &instance->sndqueue); | 646 | __skb_unlink(skb, &instance->sndqueue); |
649 | usbatm_pop(vcc, skb); | 647 | usbatm_pop(vcc, skb); |
650 | } | 648 | } |
649 | } | ||
651 | spin_unlock_irq(&instance->sndqueue.lock); | 650 | spin_unlock_irq(&instance->sndqueue.lock); |
652 | 651 | ||
653 | tasklet_disable(&instance->tx_channel.tasklet); | 652 | tasklet_disable(&instance->tx_channel.tasklet); |