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/core | |
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/core')
-rw-r--r-- | sound/core/rawmidi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c index 6b7a36774298..87b47c9564f7 100644 --- a/sound/core/rawmidi.c +++ b/sound/core/rawmidi.c | |||
@@ -631,7 +631,8 @@ int snd_rawmidi_output_params(struct snd_rawmidi_substream *substream, | |||
631 | return -EINVAL; | 631 | return -EINVAL; |
632 | } | 632 | } |
633 | if (params->buffer_size != runtime->buffer_size) { | 633 | if (params->buffer_size != runtime->buffer_size) { |
634 | if ((newbuf = (char *) kmalloc(params->buffer_size, GFP_KERNEL)) == NULL) | 634 | newbuf = kmalloc(params->buffer_size, GFP_KERNEL); |
635 | if (!newbuf) | ||
635 | return -ENOMEM; | 636 | return -ENOMEM; |
636 | kfree(runtime->buffer); | 637 | kfree(runtime->buffer); |
637 | runtime->buffer = newbuf; | 638 | runtime->buffer = newbuf; |
@@ -657,7 +658,8 @@ int snd_rawmidi_input_params(struct snd_rawmidi_substream *substream, | |||
657 | return -EINVAL; | 658 | return -EINVAL; |
658 | } | 659 | } |
659 | if (params->buffer_size != runtime->buffer_size) { | 660 | if (params->buffer_size != runtime->buffer_size) { |
660 | if ((newbuf = (char *) kmalloc(params->buffer_size, GFP_KERNEL)) == NULL) | 661 | newbuf = kmalloc(params->buffer_size, GFP_KERNEL); |
662 | if (!newbuf) | ||
661 | return -ENOMEM; | 663 | return -ENOMEM; |
662 | kfree(runtime->buffer); | 664 | kfree(runtime->buffer); |
663 | runtime->buffer = newbuf; | 665 | runtime->buffer = newbuf; |