1 Aug 2007 06:05
[PATCH]: sound: ioremap/iounmap function balancing audit
Scott Thompson <postfail <at> hushmail.com>
2007-08-01 04:05:59 GMT
2007-08-01 04:05:59 GMT
This patch, along with previously submitted dmasound_awacs.c patch,
completes an audit of the 'sound' tree for ioremap/iounmap
balancing and return code checking on ioremap calls. ioremap()
must be balanced by an iounmap() (else this causes a memory leak).
i810_audio.c had a 'fixme' issue regarding ioremap fail that was
addressed as well.
Signed-off-by: Scott Thompson <postfail <at> hushmail.com>
---
diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c
index f5e31f1..407958c 100644
--- a/sound/oss/i810_audio.c
+++ b/sound/oss/i810_audio.c
<at> <at> -3362,7 +3362,7 <at> <at> static int __devinit i810_probe(struct
pci_dev *pci_dev, const struct pci_device
if (card->use_mmio) {
if (request_mem_region(card->ac97base_mmio_phys, 512, "ich_audio
MMBAR")) {
- if ((card->ac97base_mmio = ioremap(card->ac97base_mmio_phys,
512))) { /* <at> FIXME can ioremap fail? don't know (jsaw) */
+ if ((card->ac97base_mmio = ioremap(card->ac97base_mmio_phys,
512))) {
if (request_mem_region(card->iobase_mmio_phys, 256, "ich_audio
MBBAR")) {
if ((card->iobase_mmio = ioremap(card->iobase_mmio_phys,
256))) {
(Continue reading)
RSS Feed