summaryrefslogtreecommitdiffstats
path: root/sound/core/rawmidi.c
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2006-03-28 01:56:54 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-28 09:16:09 -0800
commit4fa95ef639830ccf0ca1ad42ee9bed87ef642f32 (patch)
tree5b7357fc9f89b0d94e6a969414de2e8499cfc256 /sound/core/rawmidi.c
parent7f927fcc2fd1575d01efb4b76665975007945690 (diff)
downloadop-kernel-dev-4fa95ef639830ccf0ca1ad42ee9bed87ef642f32.zip
op-kernel-dev-4fa95ef639830ccf0ca1ad42ee9bed87ef642f32.tar.gz
[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/rawmidi.c')
-rw-r--r--sound/core/rawmidi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 6b7a367..87b47c9 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,
return -EINVAL;
}
if (params->buffer_size != runtime->buffer_size) {
- if ((newbuf = (char *) kmalloc(params->buffer_size, GFP_KERNEL)) == NULL)
+ newbuf = kmalloc(params->buffer_size, GFP_KERNEL);
+ if (!newbuf)
return -ENOMEM;
kfree(runtime->buffer);
runtime->buffer = newbuf;
@@ -657,7 +658,8 @@ int snd_rawmidi_input_params(struct snd_rawmidi_substream *substream,
return -EINVAL;
}
if (params->buffer_size != runtime->buffer_size) {
- if ((newbuf = (char *) kmalloc(params->buffer_size, GFP_KERNEL)) == NULL)
+ newbuf = kmalloc(params->buffer_size, GFP_KERNEL);
+ if (!newbuf)
return -ENOMEM;
kfree(runtime->buffer);
runtime->buffer = newbuf;
OpenPOWER on IntegriCloud