From: Dan Carpenter Date: Wed, 8 Sep 2010 22:11:41 +0000 (+0200) Subject: ALSA: rawmidi: fix the get next midi device ioctl X-Git-Tag: v2.6.36-rc4~21^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7a13d0676335a7dc9dd72264cca02606e43aaba;p=pandora-kernel.git ALSA: rawmidi: fix the get next midi device ioctl If we pass in a device which is higher than SNDRV_RAWMIDI_DEVICES then the "next device" should be -1. This function just returns device + 1. But the main thing is that "device + 1" can lead to a (harmless) integer overflow and that annoys static analysis tools. [fix the case for device == SNDRV_RAWMIDI_DEVICE by tiwai] Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai --- Reading git-diff-tree failed