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

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

firewire: ohci: fix DMA unmapping in an error path

If request_irq failed, we would pass wrong arguments to
dma_free_coherent.  https://bugzilla.redhat.com/show_bug.cgi?id=728185



Reported-by: Mads Kiilerich
Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent 9c1176b6
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -2178,8 +2178,13 @@ static int ohci_enable(struct fw_card *card,
			ohci_driver_name, ohci)) {
		fw_error("Failed to allocate interrupt %d.\n", dev->irq);
		pci_disable_msi(dev);

		if (config_rom) {
			dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
				  ohci->config_rom, ohci->config_rom_bus);
					  ohci->next_config_rom,
					  ohci->next_config_rom_bus);
			ohci->next_config_rom = NULL;
		}
		return -EIO;
	}