diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2021-05-26 14:29:56 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-05-27 08:25:01 +0200 |
commit | 93a5b85c3c53ec99782b5973f6f6559c8f0af12c (patch) | |
tree | a387885845598168aba2d5f227aa974a89f42a22 /sound/drivers | |
parent | 1519c84c0592f22e6ee9c7a7bce3032a0915e93f (diff) | |
download | linux-93a5b85c3c53ec99782b5973f6f6559c8f0af12c.tar.gz linux-93a5b85c3c53ec99782b5973f6f6559c8f0af12c.tar.bz2 linux-93a5b85c3c53ec99782b5973f6f6559c8f0af12c.zip |
ALSA: drivers: opl3: fix useless self-comparison
Sparse throws the following warning:
sound/drivers/opl3/opl3_midi.c:183:60: error: self-comparison always
evaluates to false
This is likely a 16+ year old confusion between vp2 and vp.
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210526192957.449515-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers')
-rw-r--r-- | sound/drivers/opl3/opl3_midi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/drivers/opl3/opl3_midi.c b/sound/drivers/opl3/opl3_midi.c index eb23c55323ae..e1b69c65c3c8 100644 --- a/sound/drivers/opl3/opl3_midi.c +++ b/sound/drivers/opl3/opl3_midi.c @@ -180,8 +180,7 @@ static int opl3_get_voice(struct snd_opl3 *opl3, int instr_4op, if (vp2->state == SNDRV_OPL3_ST_ON_2OP) { /* kill two voices, EXPENSIVE */ bp++; - voice_time = (voice_time > vp->time) ? - voice_time : vp->time; + voice_time = max(voice_time, vp2->time); } } else { /* allocate 2op voice */ |