projects/linux·commit 40be261d

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

40be261d · Dan Carpenter <[email protected]> · 2009-11-29 06:02:55 +00:00

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

Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Jan "Yenya" Kasprzak <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Commit
40be261dfd8bfba4baeff40168d44a6a4450ace1
Parents
3c91c7ae

Changes

1 files changed · +1 −0

FileStatusAddDelContent
drivers/net/wan/cosa.cmodified+1−0View file

drivers/net/wan/cosa.c

View file
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index e2c33c0..8e25ca7 100644
--- a/drivers/net/wan/cosa.c
+++ b/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;
}
}