Skip to content

Commit

Permalink
firewire: ohci: release channel in error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Richter committed Jul 29, 2010
1 parent 071595e commit e5b06c0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/firewire/ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit e5b06c0

Please sign in to comment.