aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ca0106
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-10-23 10:03:08 -0400
committerTakashi Iwai <tiwai@suse.de>2009-10-30 07:25:07 -0400
commit84ed1a1942e8c28fb4c23a6235ec48672fc43e49 (patch)
tree67b0d7a9c639cddd9cb6319ed67e0c0d6a680dd7 /sound/pci/ca0106
parenta688e4885c1aa6b88ab5ffa64655bacc01749c9e (diff)
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/ca0106')
-rw-r--r--sound/pci/ca0106/ca0106_proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/ca0106/ca0106_proc.c b/sound/pci/ca0106/ca0106_proc.c
index c62b7d10ec61..15523e60351c 100644
--- a/sound/pci/ca0106/ca0106_proc.c
+++ b/sound/pci/ca0106/ca0106_proc.c
@@ -304,7 +304,7 @@ static void snd_ca0106_proc_reg_write32(struct snd_info_entry *entry,
304 while (!snd_info_get_line(buffer, line, sizeof(line))) { 304 while (!snd_info_get_line(buffer, line, sizeof(line))) {
305 if (sscanf(line, "%x %x", &reg, &val) != 2) 305 if (sscanf(line, "%x %x", &reg, &val) != 2)
306 continue; 306 continue;
307 if ((reg < 0x40) && (reg >=0) && (val <= 0xffffffff) ) { 307 if (reg < 0x40 && val <= 0xffffffff) {
308 spin_lock_irqsave(&emu->emu_lock, flags); 308 spin_lock_irqsave(&emu->emu_lock, flags);
309 outl(val, emu->port + (reg & 0xfffffffc)); 309 outl(val, emu->port + (reg & 0xfffffffc));
310 spin_unlock_irqrestore(&emu->emu_lock, flags); 310 spin_unlock_irqrestore(&emu->emu_lock, flags);
@@ -405,7 +405,7 @@ static void snd_ca0106_proc_reg_write(struct snd_info_entry *entry,
405 while (!snd_info_get_line(buffer, line, sizeof(line))) { 405 while (!snd_info_get_line(buffer, line, sizeof(line))) {
406 if (sscanf(line, "%x %x %x", &reg, &channel_id, &val) != 3) 406 if (sscanf(line, "%x %x %x", &reg, &channel_id, &val) != 3)
407 continue; 407 continue;
408 if ((reg < 0x80) && (reg >=0) && (val <= 0xffffffff) && (channel_id >=0) && (channel_id <= 3) ) 408 if (reg < 0x80 && val <= 0xffffffff && channel_id <= 3)
409 snd_ca0106_ptr_write(emu, reg, channel_id, val); 409 snd_ca0106_ptr_write(emu, reg, channel_id, val);
410 } 410 }
411} 411}