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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user