]> git.baikalelectronics.ru Git - kernel.git/commit
[ALSA] fix potential NULL pointer deref in snd_sb8dsp_midi_interrupt()
authorJesper Juhl <jesper.juhl@gmail.com>
Tue, 13 Jun 2006 09:58:12 +0000 (11:58 +0200)
committerJaroslav Kysela <perex@suse.cz>
Thu, 22 Jun 2006 19:34:22 +0000 (21:34 +0200)
commit34d3e93694181ade8f425f74e6dab4aead04b029
tree6768bcbdfba41b7e4a79f5faee5d4f117e076321
parentf5ac4a3cfa4c050d0be4084534b72208ab186893
[ALSA] fix potential NULL pointer deref in snd_sb8dsp_midi_interrupt()

First testing if a pointer is NULL and if it is (or might be), proceeding
with code that dereferences that same pointer is clearly a mistake.
This happens in sound/isa/sb/sb8_midi.c::snd_sb8dsp_midi_interrupt()
The patch below reworks the code so this unfortunate case doesn't happen.
Also remove some blank comments.
Found by the Coverity checker as bug #367
Patch is compile testted only due to lack of hardware.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/isa/sb/sb8_midi.c