Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Stefan Richter <stefanr@s5r6.in-berlin.de>

+7 -2
+7 -2
drivers/firewire/ohci.c
··· 2178 2178 ohci_driver_name, ohci)) { 2179 2179 fw_error("Failed to allocate interrupt %d.\n", dev->irq); 2180 2180 pci_disable_msi(dev); 2181 - dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE, 2182 - ohci->config_rom, ohci->config_rom_bus); 2181 + 2182 + if (config_rom) { 2183 + dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE, 2184 + ohci->next_config_rom, 2185 + ohci->next_config_rom_bus); 2186 + ohci->next_config_rom = NULL; 2187 + } 2183 2188 return -EIO; 2184 2189 } 2185 2190