aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/emuproc.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-10-23 16:03:08 +0200
committerTakashi Iwai <tiwai@suse.de>2009-10-30 12:25:07 +0100
commit84ed1a1942e8c28fb4c23a6235ec48672fc43e49 (patch)
tree67b0d7a9c639cddd9cb6319ed67e0c0d6a680dd7 /sound/pci/emu10k1/emuproc.c
parentALSA: snd-usb-us122l: corrent error number for not probing US-144 on ehci-hcd (diff)
downloadlinux-dev-84ed1a1942e8c28fb4c23a6235ec48672fc43e49.tar.xz
linux-dev-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/emuproc.c')
-rw-r--r--sound/pci/emu10k1/emuproc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c
index 216f9748aff5..baa7cd508cd8 100644
--- a/sound/pci/emu10k1/emuproc.c
+++ b/sound/pci/emu10k1/emuproc.c
@@ -451,7 +451,7 @@ static void snd_emu_proc_io_reg_write(struct snd_info_entry *entry,
while (!snd_info_get_line(buffer, line, sizeof(line))) {
if (sscanf(line, "%x %x", &reg, &val) != 2)
continue;
- if ((reg < 0x40) && (reg >= 0) && (val <= 0xffffffff) ) {
+ if (reg < 0x40 && val <= 0xffffffff) {
spin_lock_irqsave(&emu->emu_lock, flags);
outl(val, emu->port + (reg & 0xfffffffc));
spin_unlock_irqrestore(&emu->emu_lock, flags);
@@ -527,7 +527,7 @@ static void snd_emu_proc_ptr_reg_write(struct snd_info_entry *entry,
while (!snd_info_get_line(buffer, line, sizeof(line))) {
if (sscanf(line, "%x %x %x", &reg, &channel_id, &val) != 3)
continue;
- if ((reg < 0xa0) && (reg >= 0) && (val <= 0xffffffff) && (channel_id >= 0) && (channel_id <= 3) )
+ if (reg < 0xa0 && val <= 0xffffffff && channel_id <= 3)
snd_ptr_write(emu, iobase, reg, channel_id, val);
}
}