[KJ] [PATCH] check return code for request_region() in gus_wave.c

Hashem Masoud masoudh at batelco.com.bh
Thu Sep 28 03:35:14 PDT 2006


This is an attempt to handle return code of request_region() in 2 places 
in gus_wave.c

Tested by compiling using the option: make dir/ (is this OK?).

Signed-off-by: Hashem Masoud <masoudh at batelco.com.bh>

--- linux/sound/oss/gus_wave.c	2006-09-28 07:23:02.730614592 -0300
+++ linux-2.6.17.13/sound/oss/gus_wave.c	2006-09-27 19:03:42.000000000 -0300
@@ -2938,8 +2938,7 @@ void __init gus_wave_init(struct address
 			model_num = "3.7";
 			gus_type = 0x37;
 			mixer_type = ICS2101;
-			if (!request_region(u_MixSelect, 1, "GUS mixer"))
-				return;
+			request_region(u_MixSelect, 1, "GUS mixer");
 		}
 		else
 		{
@@ -3030,7 +3029,7 @@ void __init gus_wave_init(struct address
 	samples = (struct patch_info *)vmalloc((MAX_SAMPLE + 1) * sizeof(*samples));
 	if (samples == NULL)
 	{
-		printk(KERN_WARNING "gus_init: Cannot allocate memory for instrument tables\n");
+		printk(KERN_WARNING "gus_init: Cant allocate memory for instrument tables\n");
 		return;
 	}
 	conf_printf(tmp, hw_config);
@@ -3085,8 +3084,7 @@ void __init gus_wave_init(struct address
 		case ICS2101:
 			gus_mic_vol = gus_line_vol = gus_pcm_volume = 100;
 			gus_wave_volume = 90;
-			if (!request_region(u_MixSelect, 1, "GUS mixer"))
-				return;
+			request_region(u_MixSelect, 1, "GUS mixer");
 			hw_config->slots[5] = ics2101_mixer_init();
 			audio_devs[gus_devnum]->mixer_dev = hw_config->slots[5];	/* Next mixer# */
 			return;




More information about the Kernel-janitors mailing list