diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-15 08:40:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-15 08:40:49 -0700 |
commit | 6f02bfc404decf5b5046f1413ef941e1870912f7 (patch) | |
tree | 8d3ef4ebba507a3d3f2e491d25dcd51c7241a401 /drivers/firewire/ohci.c | |
parent | a0b3447fb1d8b32071f473c779a482277816867a (diff) | |
parent | a01e836087881dd9d824417190994c9b2b0f1dbb (diff) | |
download | linux-3.10-6f02bfc404decf5b5046f1413ef941e1870912f7.tar.gz linux-3.10-6f02bfc404decf5b5046f1413ef941e1870912f7.tar.bz2 linux-3.10-6f02bfc404decf5b5046f1413ef941e1870912f7.zip |
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
firewire: ohci: fix DMA unmapping in an error path
firewire: cdev: fix 32 bit userland on 64 bit kernel compat corner cases
Diffstat (limited to 'drivers/firewire/ohci.c')
-rw-r--r-- | drivers/firewire/ohci.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index bcf792fac44..57cd3a406ed 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -2179,8 +2179,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); - dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE, - ohci->config_rom, ohci->config_rom_bus); + + if (config_rom) { + dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE, + ohci->next_config_rom, + ohci->next_config_rom_bus); + ohci->next_config_rom = NULL; + } return -EIO; } |