diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2006-03-28 04:56:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-28 12:16:09 -0500 |
commit | 4fa95ef639830ccf0ca1ad42ee9bed87ef642f32 (patch) | |
tree | 5b7357fc9f89b0d94e6a969414de2e8499cfc256 /sound/oss/emu10k1 | |
parent | 7f927fcc2fd1575d01efb4b76665975007945690 (diff) |
[PATCH] sound: Remove unneeded kmalloc() return value casts
Get rid of unnessesary casts of kmalloc() return value in sound/
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/oss/emu10k1')
-rw-r--r-- | sound/oss/emu10k1/midi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/oss/emu10k1/midi.c b/sound/oss/emu10k1/midi.c index 959a96794dba..25ae8e4a488d 100644 --- a/sound/oss/emu10k1/midi.c +++ b/sound/oss/emu10k1/midi.c | |||
@@ -65,7 +65,8 @@ static int midiin_add_buffer(struct emu10k1_mididevice *midi_dev, struct midi_hd | |||
65 | 65 | ||
66 | init_midi_hdr(midihdr); | 66 | init_midi_hdr(midihdr); |
67 | 67 | ||
68 | if ((midihdr->data = (u8 *) kmalloc(MIDIIN_BUFLEN, GFP_KERNEL)) == NULL) { | 68 | midihdr->data = kmalloc(MIDIIN_BUFLEN, GFP_KERNEL); |
69 | if (!midihdr->data) { | ||
69 | ERROR(); | 70 | ERROR(); |
70 | kfree(midihdr); | 71 | kfree(midihdr); |
71 | return -1; | 72 | return -1; |
@@ -334,7 +335,8 @@ static ssize_t emu10k1_midi_write(struct file *file, const char __user *buffer, | |||
334 | midihdr->bytesrecorded = 0; | 335 | midihdr->bytesrecorded = 0; |
335 | midihdr->flags = 0; | 336 | midihdr->flags = 0; |
336 | 337 | ||
337 | if ((midihdr->data = (u8 *) kmalloc(count, GFP_KERNEL)) == NULL) { | 338 | midihdr->data = kmalloc(count, GFP_KERNEL); |
339 | if (!midihdr->data) { | ||
338 | ERROR(); | 340 | ERROR(); |
339 | kfree(midihdr); | 341 | kfree(midihdr); |
340 | return -EINVAL; | 342 | return -EINVAL; |
@@ -545,7 +547,8 @@ int emu10k1_seq_midi_out(int dev, unsigned char midi_byte) | |||
545 | midihdr->bytesrecorded = 0; | 547 | midihdr->bytesrecorded = 0; |
546 | midihdr->flags = 0; | 548 | midihdr->flags = 0; |
547 | 549 | ||
548 | if ((midihdr->data = (u8 *) kmalloc(1, GFP_KERNEL)) == NULL) { | 550 | midihdr->data = kmalloc(1, GFP_KERNEL); |
551 | if (!midihdr->data) { | ||
549 | ERROR(); | 552 | ERROR(); |
550 | kfree(midihdr); | 553 | kfree(midihdr); |
551 | return -EINVAL; | 554 | return -EINVAL; |