aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2010-07-28 09:50:00 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2010-07-29 17:06:25 -0400
commite5b06c077c592e7e1623641520787a3da7b7c6bf (patch)
tree92669edec5be2e06ed1b971e611a7683bb33ab75 /drivers/firewire
parent071595ebdc66d70219e2d1ce746016f64b2b19e7 (diff)
firewire: ohci: release channel in error path
firewire-ohci keeps book of which isochronous channels are occupied by IR DMA contexts, so that there cannot be more than one context listening to a certain channel. If IR context creation failed due to an out-of-memory condition, this bookkeeping leaked a channel. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/ohci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index 3f59d1df6504..2e4b425847a7 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -2309,6 +2309,7 @@ static struct fw_iso_context *ohci_allocate_iso_context(struct fw_card *card,
2309 free_page((unsigned long)ctx->header); 2309 free_page((unsigned long)ctx->header);
2310 out: 2310 out:
2311 spin_lock_irqsave(&ohci->lock, flags); 2311 spin_lock_irqsave(&ohci->lock, flags);
2312 *channels |= 1ULL << channel;
2312 *mask |= 1 << index; 2313 *mask |= 1 << index;
2313 spin_unlock_irqrestore(&ohci->lock, flags); 2314 spin_unlock_irqrestore(&ohci->lock, flags);
2314 2315