mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 1/1] OSS gus_wave missing return check for request_region()
@ 2006-03-17 11:13 Laurent Wandrebeck
  0 siblings, 0 replies; only message in thread
From: Laurent Wandrebeck @ 2006-03-17 11:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm

Hi,
in sound/oss/gus_wave.c, request_region() is called without checking the return
value. Here is a simple patch to fix it.
Patch against 2.6.16-rc6-git8.
Please CC me on replies.
Regards.

Signed-off-by: Laurent Wandrebeck <l.wandrebeck@free.fr>

--- linux-2.6.16-rc6/sound/oss/gus_wave.c.ori   2006-03-17 11:33:36.000000000 +0100
+++ linux-2.6.16-rc6/sound/oss/gus_wave.c       2006-03-17 11:46:46.000000000 +0100
@@ -2938,7 +2938,11 @@ 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")) {
+                           printk(KERN_ERR "gus_card: unable to reserve region %d for mixer\n",
+                                            u_MixSelect);
+                           return;
+                       }
                }
                else
                {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-17 11:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-17 11:13 [patch 1/1] OSS gus_wave missing return check for request_region() Laurent Wandrebeck

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®