diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/oss/sb_mixer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/oss/sb_mixer.c b/sound/oss/sb_mixer.c index f56898c3981e..ccb21d48d42c 100644 --- a/sound/oss/sb_mixer.c +++ b/sound/oss/sb_mixer.c | |||
@@ -273,14 +273,14 @@ int sb_common_mixer_set(sb_devc * devc, int dev, int left, int right) | |||
273 | int regoffs; | 273 | int regoffs; |
274 | unsigned char val; | 274 | unsigned char val; |
275 | 275 | ||
276 | if ((dev < 0) || (dev >= devc->iomap_sz)) | ||
277 | return -EINVAL; | ||
278 | |||
276 | regoffs = (*devc->iomap)[dev][LEFT_CHN].regno; | 279 | regoffs = (*devc->iomap)[dev][LEFT_CHN].regno; |
277 | 280 | ||
278 | if (regoffs == 0) | 281 | if (regoffs == 0) |
279 | return -EINVAL; | 282 | return -EINVAL; |
280 | 283 | ||
281 | if ((dev < 0) || (dev >= devc->iomap_sz)) | ||
282 | return -EINVAL; | ||
283 | |||
284 | val = sb_getmixer(devc, regoffs); | 284 | val = sb_getmixer(devc, regoffs); |
285 | change_bits(devc, &val, dev, LEFT_CHN, left); | 285 | change_bits(devc, &val, dev, LEFT_CHN, left); |
286 | 286 | ||