From: Hashem Masoud Date: Thu, 28 Sep 2006 10:40:15 +0000 Subject: [KJ] [PATCH] check return code for request_region() in gus_wave.c Message-Id: <20060928104015.GA12356@localhost.localdomain> List-Id: References: <20060928103514.GA12240@localhost.localdomain> In-Reply-To: <20060928103514.GA12240@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kernel-janitors@vger.kernel.org Sorry, ignore the previous message. This is the correct patch. Signed-off-by: Hashem Masoud --- linux-2.6.17.13/sound/oss/gus_wave.c 2006-09-27 19:03:42.000000000 -0300 +++ linux/sound/oss/gus_wave.c 2006-09-28 07:23:02.730614592 -0300 @@ -2938,7 +2938,8 @@ void __init gus_wave_init(struct address model_num = "3.7"; gus_type = 0x37; mixer_type = ICS2101; - request_region(u_MixSelect, 1, "GUS mixer"); + if (!request_region(u_MixSelect, 1, "GUS mixer")) + return; } else { @@ -3029,7 +3030,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: Cant allocate memory for instrument tables\n"); + printk(KERN_WARNING "gus_init: Cannot allocate memory for instrument tables\n"); return; } conf_printf(tmp, hw_config); @@ -3084,7 +3085,8 @@ void __init gus_wave_init(struct address case ICS2101: gus_mic_vol = gus_line_vol = gus_pcm_volume = 100; gus_wave_volume = 90; - request_region(u_MixSelect, 1, "GUS mixer"); + if (!request_region(u_MixSelect, 1, "GUS mixer")) + return; hw_config->slots[5] = ics2101_mixer_init(); audio_devs[gus_devnum]->mixer_dev = hw_config->slots[5]; /* Next mixer# */ return; _______________________________________________ Kernel-janitors mailing list Kernel-janitors@lists.osdl.org https://lists.osdl.org/mailman/listinfo/kernel-janitors