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:
Roel Kluin
2009-10-23 16:03:08 +02:00
committed by Takashi Iwai
父節點 a688e4885c
當前提交 84ed1a1942
共有 7 個文件被更改,包括 8 次插入12 次删除

查看文件

@@ -85,7 +85,7 @@ static int tlv320aic23_write(struct snd_soc_codec *codec, unsigned int reg,
* of data into val
*/
if ((reg < 0 || reg > 9) && (reg != 15)) {
if (reg > 9 && reg != 15) {
printk(KERN_WARNING "%s Invalid register R%u\n", __func__, reg);
return -1;
}