wan: cosa: drop chan->wsem on error path
authorDan Carpenter <error27@gmail.com>
Sun, 29 Nov 2009 06:02:55 +0000 (06:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Nov 2009 08:06:51 +0000 (00:06 -0800)
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>
drivers/net/wan/cosa.c

index e2c33c06190bb1fa0975b634b765de70d22ad71f..8e25ca7080c7bb0a73ae3b3eb63ed79721d58d64 100644 (file)
@@ -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;
                }
        }