Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5b06c07 authored by Stefan Richter's avatar Stefan Richter
Browse files

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: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent 071595eb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);