mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 6/9] sound/pci/rme9652/hdsp.c: ioremap balanced with iounmap
@ 2006-10-06  5:38 Amol Lad
  2006-10-06 14:42 ` 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>
---
 hdsp.c |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)
---
diff -uprN -X linux-2.6.19-rc1-orig/Documentation/dontdiff linux-2.6.19-rc1-orig/sound/pci/rme9652/hdsp.c linux-2.6.19-rc1/sound/pci/rme9652/hdsp.c
--- linux-2.6.19-rc1-orig/sound/pci/rme9652/hdsp.c	2006-10-05 14:01:05.000000000 +0530
+++ linux-2.6.19-rc1/sound/pci/rme9652/hdsp.c	2006-10-05 16:54:38.000000000 +0530
@@ -4936,6 +4936,7 @@ static int __devinit snd_hdsp_create(str
 
 	if (request_irq(pci->irq, snd_hdsp_interrupt, IRQF_DISABLED|IRQF_SHARED, "hdsp", (void *)hdsp)) {
 		snd_printk(KERN_ERR "Hammerfall-DSP: unable to use IRQ %d\n", pci->irq);
+		iounmap(hdsp->iobase);
 		return -EBUSY;
 	}
 
@@ -4943,8 +4944,10 @@ static int __devinit snd_hdsp_create(str
 	hdsp->precise_ptr = 1;
 	hdsp->use_midi_tasklet = 1;
 
-	if ((err = snd_hdsp_initialize_memory(hdsp)) < 0)
+	if ((err = snd_hdsp_initialize_memory(hdsp)) < 0) {
+		iounmap(hdsp->iobase);
 		return err;
+	}
 	
 	if (!is_9652 && !is_9632) {
 		/* we wait 2 seconds to let freshly inserted cardbus cards do their hardware init */
@@ -4964,8 +4967,10 @@ static int __devinit snd_hdsp_create(str
 #endif
 			/* no iobox connected, we defer initialization */
 			snd_printk(KERN_INFO "Hammerfall-DSP: card initialization pending : waiting for firmware\n");
-			if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0)
+			if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) {
+				iounmap(hdsp->iobase);
 				return err;
+			}
 			return 0;
 		} else {
 			snd_printk(KERN_INFO "Hammerfall-DSP: Firmware already present, initializing card.\n");	    
@@ -4976,8 +4981,10 @@ static int __devinit snd_hdsp_create(str
 		}
 	}
 	
-	if ((err = snd_hdsp_enable_io(hdsp)) != 0)
+	if ((err = snd_hdsp_enable_io(hdsp)) != 0) {
+		iounmap(hdsp->iobase);
 		return err;
+	}
 	
 	if (is_9652)
 	        hdsp->io_type = H9652;
@@ -4985,16 +4992,20 @@ static int __devinit snd_hdsp_create(str
 	if (is_9632)
 		hdsp->io_type = H9632;
 
-	if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0)
+	if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) {
+		iounmap(hdsp->iobase);
 		return err;
+	}
 	
 	snd_hdsp_initialize_channels(hdsp);
 	snd_hdsp_initialize_midi_flush(hdsp);
 
 	hdsp->state |= HDSP_FirmwareLoaded;	
 
-	if ((err = snd_hdsp_create_alsa_devices(card, hdsp)) < 0)
+	if ((err = snd_hdsp_create_alsa_devices(card, hdsp)) < 0) {
+		iounmap(hdsp->iobase);
 		return err;
+	}
 
 	return 0;	
 }



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 6/9] sound/pci/rme9652/hdsp.c: ioremap balanced with iounmap
  2006-10-06  5:38 [PATCH 6/9] sound/pci/rme9652/hdsp.c: ioremap balanced with iounmap Amol Lad
@ 2006-10-06 14:42 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2006-10-06 14:42 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, too, as well as your patch for hdspm.c...
Ditto for rme32.c, rme96.c, and rme9652.c.

The fix for au88x0.c seems correct, though.


Takashi

> ---
>  hdsp.c |   21 ++++++++++++++++-----
>  1 files changed, 16 insertions(+), 5 deletions(-)
> ---
> diff -uprN -X linux-2.6.19-rc1-orig/Documentation/dontdiff linux-2.6.19-rc1-orig/sound/pci/rme9652/hdsp.c linux-2.6.19-rc1/sound/pci/rme9652/hdsp.c
> --- linux-2.6.19-rc1-orig/sound/pci/rme9652/hdsp.c	2006-10-05 14:01:05.000000000 +0530
> +++ linux-2.6.19-rc1/sound/pci/rme9652/hdsp.c	2006-10-05 16:54:38.000000000 +0530
> @@ -4936,6 +4936,7 @@ static int __devinit snd_hdsp_create(str
>  
>  	if (request_irq(pci->irq, snd_hdsp_interrupt, IRQF_DISABLED|IRQF_SHARED, "hdsp", (void *)hdsp)) {
>  		snd_printk(KERN_ERR "Hammerfall-DSP: unable to use IRQ %d\n", pci->irq);
> +		iounmap(hdsp->iobase);
>  		return -EBUSY;
>  	}
>  
> @@ -4943,8 +4944,10 @@ static int __devinit snd_hdsp_create(str
>  	hdsp->precise_ptr = 1;
>  	hdsp->use_midi_tasklet = 1;
>  
> -	if ((err = snd_hdsp_initialize_memory(hdsp)) < 0)
> +	if ((err = snd_hdsp_initialize_memory(hdsp)) < 0) {
> +		iounmap(hdsp->iobase);
>  		return err;
> +	}
>  	
>  	if (!is_9652 && !is_9632) {
>  		/* we wait 2 seconds to let freshly inserted cardbus cards do their hardware init */
> @@ -4964,8 +4967,10 @@ static int __devinit snd_hdsp_create(str
>  #endif
>  			/* no iobox connected, we defer initialization */
>  			snd_printk(KERN_INFO "Hammerfall-DSP: card initialization pending : waiting for firmware\n");
> -			if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0)
> +			if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) {
> +				iounmap(hdsp->iobase);
>  				return err;
> +			}
>  			return 0;
>  		} else {
>  			snd_printk(KERN_INFO "Hammerfall-DSP: Firmware already present, initializing card.\n");	    
> @@ -4976,8 +4981,10 @@ static int __devinit snd_hdsp_create(str
>  		}
>  	}
>  	
> -	if ((err = snd_hdsp_enable_io(hdsp)) != 0)
> +	if ((err = snd_hdsp_enable_io(hdsp)) != 0) {
> +		iounmap(hdsp->iobase);
>  		return err;
> +	}
>  	
>  	if (is_9652)
>  	        hdsp->io_type = H9652;
> @@ -4985,16 +4992,20 @@ static int __devinit snd_hdsp_create(str
>  	if (is_9632)
>  		hdsp->io_type = H9632;
>  
> -	if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0)
> +	if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) {
> +		iounmap(hdsp->iobase);
>  		return err;
> +	}
>  	
>  	snd_hdsp_initialize_channels(hdsp);
>  	snd_hdsp_initialize_midi_flush(hdsp);
>  
>  	hdsp->state |= HDSP_FirmwareLoaded;	
>  
> -	if ((err = snd_hdsp_create_alsa_devices(card, hdsp)) < 0)
> +	if ((err = snd_hdsp_create_alsa_devices(card, hdsp)) < 0) {
> +		iounmap(hdsp->iobase);
>  		return err;
> +	}
>  
>  	return 0;	
>  }
> 
> 
> -
> 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:42 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 6/9] sound/pci/rme9652/hdsp.c: ioremap balanced with iounmap Amol Lad
2006-10-06 14:42 ` 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®