diff options
author | Jesper Juhl <juhl-lkml@dif.dk> | 2005-06-25 14:58:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 16:25:00 -0700 |
commit | 09417379be9b126e10ae7dcd7afc20b666146266 (patch) | |
tree | 0236f4cb1afb4cf9a7f13b67e6ac639c55fa0440 /sound/oss/emu10k1/midi.c | |
parent | 4ae6673e029d609da7ef4311440d6de501d6967a (diff) |
[PATCH] remove redundant NULL checks before kfree() in sound/ and avoid casting pointers about to be kfree()'ed
Checking a pointer for NULL before calling kfree() on it is redundant,
kfree() deals with NULL pointers just fine.
This patch removes such checks from sound/
This patch also makes another, but closely related, change.
It avoids casting pointers about to be kfree()'ed.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/oss/emu10k1/midi.c')
-rw-r--r-- | sound/oss/emu10k1/midi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/oss/emu10k1/midi.c b/sound/oss/emu10k1/midi.c index 33dea3d56c1..b40b5f97aac 100644 --- a/sound/oss/emu10k1/midi.c +++ b/sound/oss/emu10k1/midi.c @@ -523,10 +523,8 @@ void emu10k1_seq_midi_close(int dev) card = midi_devs[dev]->devc; emu10k1_mpuout_close(card); - if (card->seq_mididev) { - kfree(card->seq_mididev); - card->seq_mididev = NULL; - } + kfree(card->seq_mididev); + card->seq_mididev = NULL; } int emu10k1_seq_midi_out(int dev, unsigned char midi_byte) |