summaryrefslogtreecommitdiffstats
path: root/sound/oss/sb_mixer.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/oss/sb_mixer.c')
-rw-r--r--sound/oss/sb_mixer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/oss/sb_mixer.c b/sound/oss/sb_mixer.c
index f56898c..ccb21d4 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)
int regoffs;
unsigned char val;
+ if ((dev < 0) || (dev >= devc->iomap_sz))
+ return -EINVAL;
+
regoffs = (*devc->iomap)[dev][LEFT_CHN].regno;
if (regoffs == 0)
return -EINVAL;
- if ((dev < 0) || (dev >= devc->iomap_sz))
- return -EINVAL;
-
val = sb_getmixer(devc, regoffs);
change_bits(devc, &val, dev, LEFT_CHN, left);
OpenPOWER on IntegriCloud