Browse Source

wan: cosa: drop chan->wsem on error path

The other paths all drop chan->wsem.  This was found by a static
checker (smatch).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Carpenter 15 years ago
parent
commit
40be261dfd
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/net/wan/cosa.c

+ 1 - 0
drivers/net/wan/cosa.c

@@ -907,6 +907,7 @@ static ssize_t cosa_write(struct file *file,
 			current->state = TASK_RUNNING;
 			chan->tx_status = 1;
 			spin_unlock_irqrestore(&cosa->lock, flags);
+			up(&chan->wsem);
 			return -ERESTARTSYS;
 		}
 	}