diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/spider_net.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index 15b0bcaec467..653a91adacc7 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -803,8 +803,12 @@ spider_net_release_tx_chain(struct spider_net_card *card, int brutal) | |||
803 | unsigned long flags; | 803 | unsigned long flags; |
804 | int status; | 804 | int status; |
805 | 805 | ||
806 | while (chain->tail != chain->head) { | 806 | while (1) { |
807 | spin_lock_irqsave(&chain->lock, flags); | 807 | spin_lock_irqsave(&chain->lock, flags); |
808 | if (chain->tail == chain->head) { | ||
809 | spin_unlock_irqrestore(&chain->lock, flags); | ||
810 | return 0; | ||
811 | } | ||
808 | descr = chain->tail; | 812 | descr = chain->tail; |
809 | hwdescr = descr->hwdescr; | 813 | hwdescr = descr->hwdescr; |
810 | 814 | ||