aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/sound_oss.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/sound_oss.c')
-rw-r--r--sound/core/sound_oss.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c
index b9e89cac4c5d..3ae1c0d7ffd0 100644
--- a/sound/core/sound_oss.c
+++ b/sound/core/sound_oss.c
@@ -105,6 +105,8 @@ int snd_register_oss_device(int type, struct snd_card *card, int dev,
105 int register1 = -1, register2 = -1; 105 int register1 = -1, register2 = -1;
106 struct device *carddev = NULL; 106 struct device *carddev = NULL;
107 107
108 if (card && card->number >= 8)
109 return 0; /* ignore silently */
108 if (minor < 0) 110 if (minor < 0)
109 return minor; 111 return minor;
110 preg = kmalloc(sizeof(struct snd_minor), GFP_KERNEL); 112 preg = kmalloc(sizeof(struct snd_minor), GFP_KERNEL);
@@ -162,6 +164,8 @@ int snd_unregister_oss_device(int type, struct snd_card *card, int dev)
162 int track2 = -1; 164 int track2 = -1;
163 struct snd_minor *mptr; 165 struct snd_minor *mptr;
164 166
167 if (card && card->number >= 8)
168 return 0;
165 if (minor < 0) 169 if (minor < 0)
166 return minor; 170 return minor;
167 down(&sound_oss_mutex); 171 down(&sound_oss_mutex);