aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/usblp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/class/usblp.c')
-rw-r--r--drivers/usb/class/usblp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 30d5a1315cc8..9696668e5752 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -331,9 +331,6 @@ static void usblp_bulk_write(struct urb *urb)
331 wake_up(&usblp->wwait); 331 wake_up(&usblp->wwait);
332 spin_unlock(&usblp->lock); 332 spin_unlock(&usblp->lock);
333 333
334 /* XXX Use usb_setup_bulk_urb when available. Talk to Marcel. */
335 kfree(urb->transfer_buffer);
336 urb->transfer_buffer = NULL; /* Not refcounted, so to be safe... */
337 usb_free_urb(urb); 334 usb_free_urb(urb);
338} 335}
339 336
@@ -719,6 +716,7 @@ static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t
719 usb_sndbulkpipe(usblp->dev, 716 usb_sndbulkpipe(usblp->dev,
720 usblp->protocol[usblp->current_protocol].epwrite->bEndpointAddress), 717 usblp->protocol[usblp->current_protocol].epwrite->bEndpointAddress),
721 writebuf, transfer_length, usblp_bulk_write, usblp); 718 writebuf, transfer_length, usblp_bulk_write, usblp);
719 writeurb->transfer_flags |= URB_FREE_BUFFER;
722 usb_anchor_urb(writeurb, &usblp->urbs); 720 usb_anchor_urb(writeurb, &usblp->urbs);
723 721
724 if (copy_from_user(writebuf, 722 if (copy_from_user(writebuf,