[PATCH] usb: renesas_usbhs: fixup inconsistent return from usbhs_pkt_push()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
---
 drivers/usb/renesas_usbhs/fifo.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index 762b742..8da685e 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;
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux