aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers/opl3/opl3_oss.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/drivers/opl3/opl3_oss.c')
-rw-r--r--sound/drivers/opl3/opl3_oss.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sound/drivers/opl3/opl3_oss.c b/sound/drivers/opl3/opl3_oss.c
index 239347f26154..9a2271dc046a 100644
--- a/sound/drivers/opl3/opl3_oss.c
+++ b/sound/drivers/opl3/opl3_oss.c
@@ -162,7 +162,8 @@ static int snd_opl3_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure)
162 struct snd_opl3 *opl3 = closure; 162 struct snd_opl3 *opl3 = closure;
163 int err; 163 int err;
164 164
165 snd_assert(arg != NULL, return -ENXIO); 165 if (snd_BUG_ON(!arg))
166 return -ENXIO;
166 167
167 if ((err = snd_opl3_synth_setup(opl3)) < 0) 168 if ((err = snd_opl3_synth_setup(opl3)) < 0)
168 return err; 169 return err;
@@ -184,7 +185,8 @@ static int snd_opl3_close_seq_oss(struct snd_seq_oss_arg *arg)
184{ 185{
185 struct snd_opl3 *opl3; 186 struct snd_opl3 *opl3;
186 187
187 snd_assert(arg != NULL, return -ENXIO); 188 if (snd_BUG_ON(!arg))
189 return -ENXIO;
188 opl3 = arg->private_data; 190 opl3 = arg->private_data;
189 191
190 snd_opl3_synth_cleanup(opl3); 192 snd_opl3_synth_cleanup(opl3);
@@ -206,7 +208,8 @@ static int snd_opl3_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format,
206 char name[32]; 208 char name[32];
207 int err, type; 209 int err, type;
208 210
209 snd_assert(arg != NULL, return -ENXIO); 211 if (snd_BUG_ON(!arg))
212 return -ENXIO;
210 opl3 = arg->private_data; 213 opl3 = arg->private_data;
211 214
212 if (format == FM_PATCH) 215 if (format == FM_PATCH)
@@ -246,7 +249,8 @@ static int snd_opl3_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd,
246{ 249{
247 struct snd_opl3 *opl3; 250 struct snd_opl3 *opl3;
248 251
249 snd_assert(arg != NULL, return -ENXIO); 252 if (snd_BUG_ON(!arg))
253 return -ENXIO;
250 opl3 = arg->private_data; 254 opl3 = arg->private_data;
251 switch (cmd) { 255 switch (cmd) {
252 case SNDCTL_FM_LOAD_INSTR: 256 case SNDCTL_FM_LOAD_INSTR:
@@ -271,7 +275,8 @@ static int snd_opl3_reset_seq_oss(struct snd_seq_oss_arg *arg)
271{ 275{
272 struct snd_opl3 *opl3; 276 struct snd_opl3 *opl3;
273 277
274 snd_assert(arg != NULL, return -ENXIO); 278 if (snd_BUG_ON(!arg))
279 return -ENXIO;
275 opl3 = arg->private_data; 280 opl3 = arg->private_data;
276 281
277 return 0; 282 return 0;