From a2c76b83fdd763c826f38a55127ccf25708099ce Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 18 Oct 2011 20:05:50 -0700 Subject: 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 Signed-off-by: Kuninori Morimoto Signed-off-by: Greg Kroah-Hartman --- drivers/usb/renesas_usbhs/fifo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/usb/renesas_usbhs/fifo.c') diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index 762b7429d8b..8da685e796d 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -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; -- cgit v1.2.3-18-g5258