diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-05-05 11:24:03 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-12 21:22:18 -0400 |
commit | b30cdfc517b06f5d3f7a5e90626931140b2caece (patch) | |
tree | c326c5611e501011cdf1193b6c78ca18e3cfe79b /drivers/net/wireless | |
parent | ed499983b88d138848ec9e4d104fd86a5ef0c183 (diff) |
rt2x00: Clean up error handling of PCI queue DMA allocation.
When, for some reason, the rt2x00pci module fails to allocate DMA memory for
the queues, it tries to undo the complete initialization of the PCI device,
including freeing of the irq. This results in the following error in dmesg, as
the irq hadn't been requested yet:
[ 78.123456] Trying to free already-free IRQ 17
Fix this by implementing proper error handling code, instead of just using the
full uninitialization function.
Signed-off-by: Gertjan van Wingerde <gwingerde@kpnplanet.nl>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index 7867ec64bd2c..971af2546b59 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -314,13 +314,14 @@ int rt2x00pci_initialize(struct rt2x00_dev *rt2x00dev) | |||
314 | if (status) { | 314 | if (status) { |
315 | ERROR(rt2x00dev, "IRQ %d allocation failed (error %d).\n", | 315 | ERROR(rt2x00dev, "IRQ %d allocation failed (error %d).\n", |
316 | pci_dev->irq, status); | 316 | pci_dev->irq, status); |
317 | return status; | 317 | goto exit; |
318 | } | 318 | } |
319 | 319 | ||
320 | return 0; | 320 | return 0; |
321 | 321 | ||
322 | exit: | 322 | exit: |
323 | rt2x00pci_uninitialize(rt2x00dev); | 323 | queue_for_each(rt2x00dev, queue) |
324 | rt2x00pci_free_queue_dma(rt2x00dev, queue); | ||
324 | 325 | ||
325 | return status; | 326 | return status; |
326 | } | 327 | } |