Commit c618808d authored by Chas Williams's avatar Chas Williams Committed by David S. Miller

[ATM]: Fix possible unlock of a non-locked lock in HE driver.

parent 5ab6be14
...@@ -2710,12 +2710,13 @@ he_close(struct atm_vcc *vcc) ...@@ -2710,12 +2710,13 @@ he_close(struct atm_vcc *vcc)
remove_wait_queue(&he_vcc->tx_waitq, &wait); remove_wait_queue(&he_vcc->tx_waitq, &wait);
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
spin_lock_irqsave(&he_dev->global_lock, flags);
if (timeout == 0) { if (timeout == 0) {
hprintk("close tx timeout cid 0x%x\n", cid); hprintk("close tx timeout cid 0x%x\n", cid);
goto close_tx_incomplete; goto close_tx_incomplete;
} }
spin_lock_irqsave(&he_dev->global_lock, flags);
while (!((tsr4 = he_readl_tsr4(he_dev, cid)) & TSR4_SESSION_ENDED)) { while (!((tsr4 = he_readl_tsr4(he_dev, cid)) & TSR4_SESSION_ENDED)) {
HPRINTK("close tx cid 0x%x !TSR4_SESSION_ENDED (tsr4 = 0x%x)\n", cid, tsr4); HPRINTK("close tx cid 0x%x !TSR4_SESSION_ENDED (tsr4 = 0x%x)\n", cid, tsr4);
udelay(250); udelay(250);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment