diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-24 13:02:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-24 13:02:55 -0400 |
commit | b4a41ed24c858d75985c7dcba685715fdf2e6114 (patch) | |
tree | 04a28143a4b6ce37fdca3106dabfae713315184c /drivers/usb/misc/uss720.c | |
parent | 76d21c563569bcea6bc67d65cc2c460cff643058 (diff) | |
parent | 7e7797e7f6f7bfab73fca02c65e40eaa5bb9000c (diff) |
Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: cdc-acm: fix potential null-pointer dereference on disconnect
USB: cdc-acm: fix potential null-pointer dereference
USB: cdc-acm: fix memory corruption / panic
USB: Fix 'bad dma' problem on WDM device disconnect
usb: wwan: fix compilation without CONFIG_PM_RUNTIME
USB: uss720 fixup refcount position
usb: musb: blackfin: fix typo in new bfin_musb_vbus_status func
usb: musb: blackfin: fix typo in new dev_pm_ops struct
usb: musb: blackfin: fix typo in platform driver name
usb: musb: Fix for merge issue
ehci-hcd: Bug fix: don't set a QH's Halt bit
USB: Do not pass negative length to snoop_urb()
Diffstat (limited to 'drivers/usb/misc/uss720.c')
-rw-r--r-- | drivers/usb/misc/uss720.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c index f7a205738032..8b1d94a76914 100644 --- a/drivers/usb/misc/uss720.c +++ b/drivers/usb/misc/uss720.c | |||
@@ -177,12 +177,11 @@ static struct uss720_async_request *submit_async_request(struct parport_uss720_p | |||
177 | spin_lock_irqsave(&priv->asynclock, flags); | 177 | spin_lock_irqsave(&priv->asynclock, flags); |
178 | list_add_tail(&rq->asynclist, &priv->asynclist); | 178 | list_add_tail(&rq->asynclist, &priv->asynclist); |
179 | spin_unlock_irqrestore(&priv->asynclock, flags); | 179 | spin_unlock_irqrestore(&priv->asynclock, flags); |
180 | kref_get(&rq->ref_count); | ||
180 | ret = usb_submit_urb(rq->urb, mem_flags); | 181 | ret = usb_submit_urb(rq->urb, mem_flags); |
181 | if (!ret) { | 182 | if (!ret) |
182 | kref_get(&rq->ref_count); | ||
183 | return rq; | 183 | return rq; |
184 | } | 184 | destroy_async(&rq->ref_count); |
185 | kref_put(&rq->ref_count, destroy_async); | ||
186 | err("submit_async_request submit_urb failed with %d", ret); | 185 | err("submit_async_request submit_urb failed with %d", ret); |
187 | return NULL; | 186 | return NULL; |
188 | } | 187 | } |