From: Stefan Richter Date: Wed, 28 Jul 2010 13:50:00 +0000 (+0200) Subject: firewire: ohci: release channel in error path X-Git-Tag: v2.6.36-rc1~490^2^3~4 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5b06c077c592e7e1623641520787a3da7b7c6bf;p=pandora-kernel.git 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 --- 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, free_page((unsigned long)ctx->header); out: spin_lock_irqsave(&ohci->lock, flags); + *channels |= 1ULL << channel; *mask |= 1 << index; spin_unlock_irqrestore(&ohci->lock, flags);