aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/yurex.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/yurex.c')
-rw-r--r--drivers/usb/misc/yurex.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c
index 897edda42270..70201462e19c 100644
--- a/drivers/usb/misc/yurex.c
+++ b/drivers/usb/misc/yurex.c
@@ -99,9 +99,7 @@ static void yurex_delete(struct kref *kref)
99 usb_put_dev(dev->udev); 99 usb_put_dev(dev->udev);
100 if (dev->cntl_urb) { 100 if (dev->cntl_urb) {
101 usb_kill_urb(dev->cntl_urb); 101 usb_kill_urb(dev->cntl_urb);
102 if (dev->cntl_req) 102 kfree(dev->cntl_req);
103 usb_free_coherent(dev->udev, YUREX_BUF_SIZE,
104 dev->cntl_req, dev->cntl_urb->setup_dma);
105 if (dev->cntl_buffer) 103 if (dev->cntl_buffer)
106 usb_free_coherent(dev->udev, YUREX_BUF_SIZE, 104 usb_free_coherent(dev->udev, YUREX_BUF_SIZE,
107 dev->cntl_buffer, dev->cntl_urb->transfer_dma); 105 dev->cntl_buffer, dev->cntl_urb->transfer_dma);
@@ -234,9 +232,7 @@ static int yurex_probe(struct usb_interface *interface, const struct usb_device_
234 } 232 }
235 233
236 /* allocate buffer for control req */ 234 /* allocate buffer for control req */
237 dev->cntl_req = usb_alloc_coherent(dev->udev, YUREX_BUF_SIZE, 235 dev->cntl_req = kmalloc(YUREX_BUF_SIZE, GFP_KERNEL);
238 GFP_KERNEL,
239 &dev->cntl_urb->setup_dma);
240 if (!dev->cntl_req) { 236 if (!dev->cntl_req) {
241 err("Could not allocate cntl_req"); 237 err("Could not allocate cntl_req");
242 goto error; 238 goto error;
@@ -286,7 +282,7 @@ static int yurex_probe(struct usb_interface *interface, const struct usb_device_
286 usb_rcvintpipe(dev->udev, dev->int_in_endpointAddr), 282 usb_rcvintpipe(dev->udev, dev->int_in_endpointAddr),
287 dev->int_buffer, YUREX_BUF_SIZE, yurex_interrupt, 283 dev->int_buffer, YUREX_BUF_SIZE, yurex_interrupt,
288 dev, 1); 284 dev, 1);
289 dev->cntl_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; 285 dev->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
290 if (usb_submit_urb(dev->urb, GFP_KERNEL)) { 286 if (usb_submit_urb(dev->urb, GFP_KERNEL)) {
291 retval = -EIO; 287 retval = -EIO;
292 err("Could not submitting URB"); 288 err("Could not submitting URB");