summaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/audio.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org.(none)>2005-04-19 07:28:57 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org.(none)>2005-04-19 07:28:57 -0700
commita9e4820c4c170b3df0d2185f7b4130b0b2daed2c (patch)
tree962bc52ba0e8e585d88e1fb9a9be9a67072767dd /drivers/usb/class/audio.c
parentc0698f2f6e4839ce9463ce731c892993215ea067 (diff)
parente838a0d4d5260bce452c96914a6e86b217c53c55 (diff)
Merge with Greg's USB tree at kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6.git/
Yah, it does work to merge. Knock wood.
Diffstat (limited to 'drivers/usb/class/audio.c')
-rw-r--r--drivers/usb/class/audio.c48
1 files changed, 16 insertions, 32 deletions
diff --git a/drivers/usb/class/audio.c b/drivers/usb/class/audio.c
index f432b7d5b23..f8f21567cc2 100644
--- a/drivers/usb/class/audio.c
+++ b/drivers/usb/class/audio.c
@@ -649,14 +649,10 @@ static void usbin_stop(struct usb_audiodev *as)
}
}
set_current_state(TASK_RUNNING);
- if (u->durb[0].urb->transfer_buffer)
- kfree(u->durb[0].urb->transfer_buffer);
- if (u->durb[1].urb->transfer_buffer)
- kfree(u->durb[1].urb->transfer_buffer);
- if (u->surb[0].urb->transfer_buffer)
- kfree(u->surb[0].urb->transfer_buffer);
- if (u->surb[1].urb->transfer_buffer)
- kfree(u->surb[1].urb->transfer_buffer);
+ kfree(u->durb[0].urb->transfer_buffer);
+ kfree(u->durb[1].urb->transfer_buffer);
+ kfree(u->surb[0].urb->transfer_buffer);
+ kfree(u->surb[1].urb->transfer_buffer);
u->durb[0].urb->transfer_buffer = u->durb[1].urb->transfer_buffer =
u->surb[0].urb->transfer_buffer = u->surb[1].urb->transfer_buffer = NULL;
}
@@ -1009,21 +1005,17 @@ static int usbin_start(struct usb_audiodev *as)
u->phase = 0;
maxsze = (u->freqmax + 0x3fff) >> (14 - AFMT_BYTESSHIFT(u->format));
bufsz = DESCFRAMES * maxsze;
- if (u->durb[0].urb->transfer_buffer)
- kfree(u->durb[0].urb->transfer_buffer);
+ kfree(u->durb[0].urb->transfer_buffer);
u->durb[0].urb->transfer_buffer = kmalloc(bufsz, GFP_KERNEL);
u->durb[0].urb->transfer_buffer_length = bufsz;
- if (u->durb[1].urb->transfer_buffer)
- kfree(u->durb[1].urb->transfer_buffer);
+ kfree(u->durb[1].urb->transfer_buffer);
u->durb[1].urb->transfer_buffer = kmalloc(bufsz, GFP_KERNEL);
u->durb[1].urb->transfer_buffer_length = bufsz;
if (u->syncpipe) {
- if (u->surb[0].urb->transfer_buffer)
- kfree(u->surb[0].urb->transfer_buffer);
+ kfree(u->surb[0].urb->transfer_buffer);
u->surb[0].urb->transfer_buffer = kmalloc(3*SYNCFRAMES, GFP_KERNEL);
u->surb[0].urb->transfer_buffer_length = 3*SYNCFRAMES;
- if (u->surb[1].urb->transfer_buffer)
- kfree(u->surb[1].urb->transfer_buffer);
+ kfree(u->surb[1].urb->transfer_buffer);
u->surb[1].urb->transfer_buffer = kmalloc(3*SYNCFRAMES, GFP_KERNEL);
u->surb[1].urb->transfer_buffer_length = 3*SYNCFRAMES;
}
@@ -1128,14 +1120,10 @@ static void usbout_stop(struct usb_audiodev *as)
}
}
set_current_state(TASK_RUNNING);
- if (u->durb[0].urb->transfer_buffer)
- kfree(u->durb[0].urb->transfer_buffer);
- if (u->durb[1].urb->transfer_buffer)
- kfree(u->durb[1].urb->transfer_buffer);
- if (u->surb[0].urb->transfer_buffer)
- kfree(u->surb[0].urb->transfer_buffer);
- if (u->surb[1].urb->transfer_buffer)
- kfree(u->surb[1].urb->transfer_buffer);
+ kfree(u->durb[0].urb->transfer_buffer);
+ kfree(u->durb[1].urb->transfer_buffer);
+ kfree(u->surb[0].urb->transfer_buffer);
+ kfree(u->surb[1].urb->transfer_buffer);
u->durb[0].urb->transfer_buffer = u->durb[1].urb->transfer_buffer =
u->surb[0].urb->transfer_buffer = u->surb[1].urb->transfer_buffer = NULL;
}
@@ -1376,21 +1364,17 @@ static int usbout_start(struct usb_audiodev *as)
u->phase = 0;
maxsze = (u->freqmax + 0x3fff) >> (14 - AFMT_BYTESSHIFT(u->format));
bufsz = DESCFRAMES * maxsze;
- if (u->durb[0].urb->transfer_buffer)
- kfree(u->durb[0].urb->transfer_buffer);
+ kfree(u->durb[0].urb->transfer_buffer);
u->durb[0].urb->transfer_buffer = kmalloc(bufsz, GFP_KERNEL);
u->durb[0].urb->transfer_buffer_length = bufsz;
- if (u->durb[1].urb->transfer_buffer)
- kfree(u->durb[1].urb->transfer_buffer);
+ kfree(u->durb[1].urb->transfer_buffer);
u->durb[1].urb->transfer_buffer = kmalloc(bufsz, GFP_KERNEL);
u->durb[1].urb->transfer_buffer_length = bufsz;
if (u->syncpipe) {
- if (u->surb[0].urb->transfer_buffer)
- kfree(u->surb[0].urb->transfer_buffer);
+ kfree(u->surb[0].urb->transfer_buffer);
u->surb[0].urb->transfer_buffer = kmalloc(3*SYNCFRAMES, GFP_KERNEL);
u->surb[0].urb->transfer_buffer_length = 3*SYNCFRAMES;
- if (u->surb[1].urb->transfer_buffer)
- kfree(u->surb[1].urb->transfer_buffer);
+ kfree(u->surb[1].urb->transfer_buffer);
u->surb[1].urb->transfer_buffer = kmalloc(3*SYNCFRAMES, GFP_KERNEL);
u->surb[1].urb->transfer_buffer_length = 3*SYNCFRAMES;
}