Subject: [patch] drop chan->wsem on error path

From: Dan Carpenter <[email-masked]>
Date: Sun, 29 Nov 2009 18:02:55 +0200

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

Signed-off-by: Dan Carpenter <[email-masked]>

--- orig/drivers/net/wan/cosa.c	2009-11-29 16:38:42.000000000 +0200
+++ devel/drivers/net/wan/cosa.c	2009-11-29 16:43:39.000000000 +0200
@@ -907,6 +907,7 @@ static ssize_t cosa_write(struct file *f
 			current->state = TASK_RUNNING;
 			chan->tx_status = 1;
 			spin_unlock_irqrestore(&cosa->lock, flags);
+			up(&chan->wsem);
 			return -ERESTARTSYS;
 		}
 	}