From: Amol Lad <amol@verismonetworks.com>
To: linux kernel <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>
Subject: [PATCH 2/9] sound/oss/dmasound/dmasound_awacs.c: ioremap balanced with iounmap
Date: Fri, 06 Oct 2006 11:08:53 +0530 [thread overview]
Message-ID: <1160113133.19143.130.camel@amol.verismonetworks.com> (raw)
Signed-off-by: Amol Lad <amol@verismonetworks.com>
---
dmasound_awacs.c | 39 +++++++++++++++++++++++++++++++++++----
1 files changed, 35 insertions(+), 4 deletions(-)
---
diff -uprN -X linux-2.6.19-rc1-orig/Documentation/dontdiff linux-2.6.19-rc1-orig/sound/oss/dmasound/dmasound_awacs.c linux-2.6.19-rc1/sound/oss/dmasound/dmasound_awacs.c
--- linux-2.6.19-rc1-orig/sound/oss/dmasound/dmasound_awacs.c 2006-10-05 14:01:04.000000000 +0530
+++ linux-2.6.19-rc1/sound/oss/dmasound/dmasound_awacs.c 2006-10-05 17:34:42.000000000 +0530
@@ -3067,8 +3067,9 @@ printk("dmasound_pmac: Awacs/Screamer Co
udelay(1);
/* Initialize beep stuff */
- if ((res=setup_beep()))
- return res ;
+ res=setup_beep();
+ if (res)
+ goto out_unmap;
#ifdef CONFIG_PM
pmu_register_sleep_notifier(&awacs_sleep_notifier);
@@ -3160,7 +3161,26 @@ printk("dmasound_pmac: Awacs/Screamer Co
*/
input_register_device(awacs_beep_dev);
- return dmasound_init();
+ res = dmasound_init();
+ if (res)
+ goto out_unmap1;
+
+ return 0;
+
+out_unmap1:
+ if (is_pbook_3X00)
+ iounmap(latch_base);
+ else if (is_pbook_g3)
+ iounmap(macio_base);
+out_unmap:
+ if (i2s_node)
+ iounmap(i2s);
+ else
+ iounmap(awacs);
+ iounmap(awacs_txdma);
+ iounmap(awacs_rxdma);
+
+ return res;
}
static void __exit dmasound_awacs_cleanup(void)
@@ -3177,8 +3197,19 @@ static void __exit dmasound_awacs_cleanu
daca_cleanup();
break;
}
- dmasound_deinit();
+ if (is_pbook_3X00)
+ iounmap(latch_base);
+ else if (is_pbook_g3)
+ iounmap(macio_base);
+ if (i2s_node)
+ iounmap(i2s);
+ else
+ iounmap(awacs);
+ iounmap(awacs_txdma);
+ iounmap(awacs_rxdma);
+
+ dmasound_deinit();
}
MODULE_DESCRIPTION("PowerMac built-in audio driver.");
next reply other threads:[~2006-10-06 5:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-06 5:38 Amol Lad [this message]
2006-10-06 20:54 ` Andrew Morton
2006-10-07 5:46 ` Amol Lad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1160113133.19143.130.camel@amol.verismonetworks.com \
--to=amol@verismonetworks.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®