Skip to content

Commit

Permalink
ALSA: drivers: opl3: fix useless self-comparison
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Pierre-Louis Bossart <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
plbossart authored and tiwai committed May 27, 2021
1 parent 1519c84 commit 93a5b85
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/drivers/opl3/opl3_midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 93a5b85

Please sign in to comment.