Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24502
b: refs/heads/master
c: 4fa95ef
h: refs/heads/master
v: v3
  • Loading branch information
Jesper Juhl authored and Linus Torvalds committed Mar 28, 2006
1 parent c23d19f commit ad5ca9c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7f927fcc2fd1575d01efb4b76665975007945690
refs/heads/master: 4fa95ef639830ccf0ca1ad42ee9bed87ef642f32
6 changes: 4 additions & 2 deletions trunk/sound/core/rawmidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/oss/dmasound/dmasound_awacs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) ;
Expand Down
9 changes: 6 additions & 3 deletions trunk/sound/oss/emu10k1/midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/oss/sh_dac_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ad5ca9c

Please sign in to comment.