fix an other NULL pointer and a missing spin_unlock_irqrestore

This commit is contained in:
Karsten Keil 2000-05-23 18:56:51 +00:00
parent fc43e6389b
commit 7e23ea5bee
2 changed files with 6 additions and 4 deletions

View File

@ -1424,7 +1424,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb)
lp = isdn_net_get_locked_lp(nd);
if (!lp) {
printk(KERN_WARNING "%s: all channels busy - requeuing!\n", lp->name);
printk(KERN_WARNING "%s: all channels busy - requeuing!\n", ndev->name);
return 1;
}
/* we have our lp locked from now on */

View File

@ -116,13 +116,15 @@ static __inline__ isdn_net_local * isdn_net_get_locked_lp(isdn_net_dev *nd)
while (isdn_net_lp_busy(nd->queue)) {
spin_unlock_bh(&nd->queue->xmit_lock);
nd->queue = nd->queue->next;
if (nd->queue == lp) /* not found -- should never happen */
return 0;
if (nd->queue == lp) { /* not found -- should never happen */
lp = NULL;
goto errout;
}
spin_lock_bh(&nd->queue->xmit_lock);
}
lp = nd->queue;
nd->queue = nd->queue->next;
errout:
spin_unlock_irqrestore(&nd->queue_lock, flags);
return lp;
}