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>
This commit is contained in:
@@ -256,7 +256,7 @@ int snd_emu1010_fpga_write(struct snd_emu10k1 * emu, u32 reg, u32 value)
|
||||
if (reg > 0x3f)
|
||||
return 1;
|
||||
reg += 0x40; /* 0x40 upwards are registers. */
|
||||
if (value < 0 || value > 0x3f) /* 0 to 0x3f are values */
|
||||
if (value > 0x3f) /* 0 to 0x3f are values */
|
||||
return 1;
|
||||
spin_lock_irqsave(&emu->emu_lock, flags);
|
||||
outl(reg, emu->port + A_IOCFG);
|
||||
|
Reference in New Issue
Block a user