Skip to content

Commit

Permalink
usb: renesas_usbhs: fixup inconsistent return from usbhs_pkt_push()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kuninori Morimoto authored and Greg Kroah-Hartman committed Oct 19, 2011
1 parent 3a7655f commit a2c76b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/usb/renesas_usbhs/fifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a2c76b8

Please sign in to comment.