diff options
| author | Dave Airlie <airlied@redhat.com> | 2012-05-07 16:09:09 +0100 | 
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2012-05-07 16:09:35 +0100 | 
| commit | 4f256e8aa3eda15c11c3cec3ec5336e1fc579cbd (patch) | |
| tree | 33c02b5e18e79756005a3edfa7c862a47de668d5 /drivers/usb/class/cdc-wdm.c | |
| parent | 4086b1e2b19729eebf632073b9d4ab811726d8eb (diff) | |
| parent | dc257cf154be708ecc47b8b89c12ad8cd2cc35e4 (diff) | |
| download | olio-linux-3.10-4f256e8aa3eda15c11c3cec3ec5336e1fc579cbd.tar.xz olio-linux-3.10-4f256e8aa3eda15c11c3cec3ec5336e1fc579cbd.zip  | |
Merge branch 'for-airlied' of git://people.freedesktop.org/~danvet/drm-intel into drm-core-next
Daniel prepared this branch with a back-merge as git was getting
very confused about changes in intel_display.c
Diffstat (limited to 'drivers/usb/class/cdc-wdm.c')
| -rw-r--r-- | drivers/usb/class/cdc-wdm.c | 7 | 
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index c6f6560d436..0bb2b3248da 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c @@ -157,8 +157,9 @@ static void wdm_out_callback(struct urb *urb)  	spin_lock(&desc->iuspin);  	desc->werr = urb->status;  	spin_unlock(&desc->iuspin); -	clear_bit(WDM_IN_USE, &desc->flags);  	kfree(desc->outbuf); +	desc->outbuf = NULL; +	clear_bit(WDM_IN_USE, &desc->flags);  	wake_up(&desc->wait);  } @@ -338,7 +339,7 @@ static ssize_t wdm_write  	if (we < 0)  		return -EIO; -	desc->outbuf = buf = kmalloc(count, GFP_KERNEL); +	buf = kmalloc(count, GFP_KERNEL);  	if (!buf) {  		rv = -ENOMEM;  		goto outnl; @@ -406,10 +407,12 @@ static ssize_t wdm_write  	req->wIndex = desc->inum;  	req->wLength = cpu_to_le16(count);  	set_bit(WDM_IN_USE, &desc->flags); +	desc->outbuf = buf;  	rv = usb_submit_urb(desc->command, GFP_KERNEL);  	if (rv < 0) {  		kfree(buf); +		desc->outbuf = NULL;  		clear_bit(WDM_IN_USE, &desc->flags);  		dev_err(&desc->intf->dev, "Tx URB error: %d\n", rv);  	} else {  |