summaryrefslogtreecommitdiffstats
path: root/sound/oss
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/oss
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/oss')
-rw-r--r--sound/oss/dmasound/dmasound_awacs.c2
-rw-r--r--sound/oss/emu10k1/midi.c9
-rw-r--r--sound/oss/sh_dac_audio.c2
3 files changed, 8 insertions, 5 deletions
diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c
index 6ba8d6f..3bbc810 100644
--- a/sound/oss/dmasound/dmasound_awacs.c
+++ b/sound/oss/dmasound/dmasound_awacs.c
@@ -2798,7 +2798,7 @@ __init setup_beep(void)
DBDMA_ALIGN(beep_dbdma_cmd_space);
/* set up emergency dbdma cmd */
emergency_dbdma_cmd = beep_dbdma_cmd+1 ;
- beep_buf = (short *) kmalloc(BEEP_BUFLEN * 4, GFP_KERNEL);
+ beep_buf = kmalloc(BEEP_BUFLEN * 4, GFP_KERNEL);
if (beep_buf == NULL) {
printk(KERN_ERR "dmasound_pmac: no memory for beep buffer\n");
kfree(beep_dbdma_cmd_space) ;
diff --git a/sound/oss/emu10k1/midi.c b/sound/oss/emu10k1/midi.c
index 959a967..25ae8e4 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
init_midi_hdr(midihdr);
- if ((midihdr->data = (u8 *) kmalloc(MIDIIN_BUFLEN, GFP_KERNEL)) == NULL) {
+ midihdr->data = kmalloc(MIDIIN_BUFLEN, GFP_KERNEL);
+ if (!midihdr->data) {
ERROR();
kfree(midihdr);
return -1;
@@ -334,7 +335,8 @@ static ssize_t emu10k1_midi_write(struct file *file, const char __user *buffer,
midihdr->bytesrecorded = 0;
midihdr->flags = 0;
- if ((midihdr->data = (u8 *) kmalloc(count, GFP_KERNEL)) == NULL) {
+ midihdr->data = kmalloc(count, GFP_KERNEL);
+ if (!midihdr->data) {
ERROR();
kfree(midihdr);
return -EINVAL;
@@ -545,7 +547,8 @@ int emu10k1_seq_midi_out(int dev, unsigned char midi_byte)
midihdr->bytesrecorded = 0;
midihdr->flags = 0;
- if ((midihdr->data = (u8 *) kmalloc(1, GFP_KERNEL)) == NULL) {
+ midihdr->data = kmalloc(1, GFP_KERNEL);
+ if (!midihdr->data) {
ERROR();
kfree(midihdr);
return -EINVAL;
diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c
index 8a9917c9..3f7427c 100644
--- a/sound/oss/sh_dac_audio.c
+++ b/sound/oss/sh_dac_audio.c
@@ -289,7 +289,7 @@ static int __init dac_audio_init(void)
in_use = 0;
- data_buffer = (char *)kmalloc(BUFFER_SIZE, GFP_KERNEL);
+ data_buffer = kmalloc(BUFFER_SIZE, GFP_KERNEL);
if (data_buffer == NULL)
return -ENOMEM;
OpenPOWER on IntegriCloud