Skip to contentSkip to conversation

i810_audio: fix release_region misordering in error exit from i810_probe

PATCH Applied John W. Linville 2 participants 2 messages Aug 4, 2005 – Aug 23, 2005 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i810_audio: fix release_region misordering in error exit from i810_probe

Re-order release_region calls in i810_probe to properly unwind preceding allocations.

---
Calls to release_region should be in reverse order of calls to request_region for error exit. Whoops...

 sound/oss/i810_audio.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
sound/oss/i810_audio.c +2 -2
@@ -3430,9 +3430,9 @@ out_iospace:
 		release_mem_region(card->iobase_mmio_phys, 256);
 	}
 out_pio:	
-	release_region(card->iobase, 64);
-out_region2:
 	release_region(card->ac97base, 256);
+out_region2:
+	release_region(card->iobase, 64);
 out_region1:
 	pci_free_consistent(pci_dev, sizeof(struct i810_channel)*NR_HW_CH,
 	    card->channel, card->chandma);
Signature · 2 lines
John W. Linville
[email protected]