* [PATCH 7/9] sound/pci/rme9652/hdspm.c: ioremap balanced with iounmap
@ 2006-10-06 5:38 Amol Lad
2006-10-06 14:40 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Amol Lad @ 2006-10-06 5:38 UTC (permalink / raw)
To: linux kernel; +Cc: Andrew Morton
Signed-off-by: Amol Lad <amol@verismonetworks.com>
---
hdspm.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)
---
diff -uprN -X linux-2.6.19-rc1-orig/Documentation/dontdiff linux-2.6.19-rc1-orig/sound/pci/rme9652/hdspm.c linux-2.6.19-rc1/sound/pci/rme9652/hdspm.c
--- linux-2.6.19-rc1-orig/sound/pci/rme9652/hdspm.c 2006-09-21 10:15:53.000000000 +0530
+++ linux-2.6.19-rc1/sound/pci/rme9652/hdspm.c 2006-10-05 16:55:32.000000000 +0530
@@ -3500,6 +3500,7 @@ static int __devinit snd_hdspm_create(st
IRQF_DISABLED | IRQF_SHARED, "hdspm",
(void *) hdspm)) {
snd_printk(KERN_ERR "HDSPM: unable to use IRQ %d\n", pci->irq);
+ iounmap(hdspm->iobase);
return -EBUSY;
}
@@ -3516,6 +3517,7 @@ static int __devinit snd_hdspm_create(st
== NULL) {
snd_printk(KERN_ERR "HDSPM: unable to kmalloc Mixer memory of %d Bytes\n",
(int)sizeof(struct hdspm_mixer));
+ iounmap(hdspm->iobase);
return err;
}
@@ -3524,8 +3526,10 @@ static int __devinit snd_hdspm_create(st
hdspm->qs_channels = MADI_QS_CHANNELS;
snd_printdd("create alsa devices.\n");
- if ((err = snd_hdspm_create_alsa_devices(card, hdspm)) < 0)
+ if ((err = snd_hdspm_create_alsa_devices(card, hdspm)) < 0) {
+ iounmap(hdspm->iobase);
return err;
+ }
snd_hdspm_initialize_midi_flush(hdspm);
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH 7/9] sound/pci/rme9652/hdspm.c: ioremap balanced with iounmap
2006-10-06 5:38 [PATCH 7/9] sound/pci/rme9652/hdspm.c: ioremap balanced with iounmap Amol Lad
@ 2006-10-06 14:40 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2006-10-06 14:40 UTC (permalink / raw)
To: Amol Lad; +Cc: linux kernel, Andrew Morton
At Fri, 06 Oct 2006 11:08:56 +0530,
Amol Lad wrote:
>
> Signed-off-by: Amol Lad <amol@verismonetworks.com>
This is wrong.
iounmap is called in snd_hdspm_free(), which is called when an error
is returned from any of probe part.
Takashi
> ---
> hdspm.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletion(-)
> ---
> diff -uprN -X linux-2.6.19-rc1-orig/Documentation/dontdiff linux-2.6.19-rc1-orig/sound/pci/rme9652/hdspm.c linux-2.6.19-rc1/sound/pci/rme9652/hdspm.c
> --- linux-2.6.19-rc1-orig/sound/pci/rme9652/hdspm.c 2006-09-21 10:15:53.000000000 +0530
> +++ linux-2.6.19-rc1/sound/pci/rme9652/hdspm.c 2006-10-05 16:55:32.000000000 +0530
> @@ -3500,6 +3500,7 @@ static int __devinit snd_hdspm_create(st
> IRQF_DISABLED | IRQF_SHARED, "hdspm",
> (void *) hdspm)) {
> snd_printk(KERN_ERR "HDSPM: unable to use IRQ %d\n", pci->irq);
> + iounmap(hdspm->iobase);
> return -EBUSY;
> }
>
> @@ -3516,6 +3517,7 @@ static int __devinit snd_hdspm_create(st
> == NULL) {
> snd_printk(KERN_ERR "HDSPM: unable to kmalloc Mixer memory of %d Bytes\n",
> (int)sizeof(struct hdspm_mixer));
> + iounmap(hdspm->iobase);
> return err;
> }
>
> @@ -3524,8 +3526,10 @@ static int __devinit snd_hdspm_create(st
> hdspm->qs_channels = MADI_QS_CHANNELS;
>
> snd_printdd("create alsa devices.\n");
> - if ((err = snd_hdspm_create_alsa_devices(card, hdspm)) < 0)
> + if ((err = snd_hdspm_create_alsa_devices(card, hdspm)) < 0) {
> + iounmap(hdspm->iobase);
> return err;
> + }
>
> snd_hdspm_initialize_midi_flush(hdspm);
>
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-06 14:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-06 5:38 [PATCH 7/9] sound/pci/rme9652/hdspm.c: ioremap balanced with iounmap Amol Lad
2006-10-06 14:40 ` Takashi Iwai
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®