diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-10-23 16:03:08 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-10-30 12:25:07 +0100 |
commit | 84ed1a1942e8c28fb4c23a6235ec48672fc43e49 (patch) | |
tree | 67b0d7a9c639cddd9cb6319ed67e0c0d6a680dd7 /sound/pci/emu10k1/emu10k1x.c | |
parent | a688e4885c1aa6b88ab5ffa64655bacc01749c9e (diff) | |
download | linux-84ed1a1942e8c28fb4c23a6235ec48672fc43e49.tar.gz linux-84ed1a1942e8c28fb4c23a6235ec48672fc43e49.tar.bz2 linux-84ed1a1942e8c28fb4c23a6235ec48672fc43e49.zip |
ALSA: Cleanup redundant tests on unsigned
The variables are unsigned so the test `>= 0' is always true,
the `< 0' test always fails. In these cases the other part of
the test catches wrapped values.
In dac_audio_write() there does not occur a test for wrapped
values, but the test appears redundant.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1/emu10k1x.c')
-rw-r--r-- | sound/pci/emu10k1/emu10k1x.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index 36e08bd2b3cc..6b8ae7b5cd54 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c @@ -1040,8 +1040,7 @@ static void snd_emu10k1x_proc_reg_write(struct snd_info_entry *entry, if (sscanf(line, "%x %x %x", ®, &channel_id, &val) != 3) continue; - if ((reg < 0x49) && (reg >= 0) && (val <= 0xffffffff) - && (channel_id >= 0) && (channel_id <= 2) ) + if (reg < 0x49 && val <= 0xffffffff && channel_id <= 2) snd_emu10k1x_ptr_write(emu, reg, channel_id, val); } } |