dect
/
linux-2.6
Archived
13
0
Fork 0

usb: renesas_usbhs: fixup inconsistent return from usbhs_pkt_push()

usbhs_pkt_push() had inconsistent return under spin lock.
This patch fix it up.
Special thanks to Dan

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Kuninori Morimoto 2011-10-18 20:05:50 -07:00 committed by Greg Kroah-Hartman
parent 3a7655fcb2
commit a2c76b83fd
1 changed files with 3 additions and 3 deletions

View File

@ -62,14 +62,14 @@ void usbhs_pkt_push(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt,
struct device *dev = usbhs_priv_to_dev(priv);
unsigned long flags;
/******************** spin lock ********************/
usbhs_lock(priv, flags);
if (!done) {
dev_err(dev, "no done function\n");
return;
}
/******************** spin lock ********************/
usbhs_lock(priv, flags);
if (!pipe->handler) {
dev_err(dev, "no handler function\n");
pipe->handler = &usbhsf_null_handler;